2016-10-18 46 views
0

我是一個新的yii開發者。我有索引文件在protected/modules/profile/views/company/index.php.我想註冊位於protected/modules/profile/css文件夾中的css文件。所以,我用下面的公式:如何註冊在yii1模塊中定位的css文件

<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->basePath?>'/modules/profile/css/dataTables.bootstrap.min.css' media="print"> 

但是,什麼都沒有發生。 請幫助我,我做錯了什麼?

回答

0

嘗試使用這樣

<link href="<?php echo Yii::app()->baseUrl; ?>/modules/profile/css/dataTables.bootstrap.min.css" rel="stylesheet">