我是 yii 的新手,我正在尝试安装助推器,如主页中所述,但没有成功。
扩展有效,我使用“bootstrap.gii”生成了 CRUD,但我使用了经典的蓝图主题。有我的视图输出:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<!-- blueprint CSS framework -->
<link rel="stylesheet" type="text/css" href="/thouraya_booster/css/screen.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="/thouraya_booster/css/print.css" media="print" />
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="/thouraya_booster/css/ie.css" media="screen, projection" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="/thouraya_booster/css/main.css" />
<link rel="stylesheet" type="text/css" href="/thouraya_booster/css/form.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/thouraya_booster/assets/b50f179f/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/thouraya_booster/assets/b50f179f/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="/thouraya_booster/assets/b50f179f/css/bootstrap-yii.css" />
<link rel="stylesheet" type="text/css" href="/thouraya_booster/assets/b50f179f/css/jquery-ui-bootstrap.css" />
<script type="text/javascript" src="/thouraya_booster/assets/f74bdb93/jquery.js"></script>
<script type="text/javascript" src="/thouraya_booster/assets/b50f179f/js/bootstrap.bootbox.min.js"></script>
<script type="text/javascript" src="/thouraya_booster/assets/b50f179f/js/bootstrap.js"></script>
<title>My Web Application</title>
</head>
我尝试手动添加 bootsrtap 主题,因为它曾经与 chris 的引导扩展一起使用,但我收到此错误消息Bootstrap 及其行为没有名为“register”的方法或闭包。
我试图手动修改 layouts/main.php 交换加载 css 的蓝图,<?php echo Yii::app()->bootstrap->registerCoreCss(); ?>
但它不起作用
我什至尝试了一个chmod777
for if 访问被拒绝某些 css 文件,然后扩展名将其替换为 yii 的默认文件。
这是我的配置文件的样子:
...
// preloading 'log' component
'preload'=>array(
'log',
'bootstrap',
),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'root',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths' => array(
'bootstrap.gii'
),
),
),
// application components
'components'=>array(
'bootstrap' => array(
'class' => 'ext.bootstrap.components.Bootstrap',
'responsiveCss' => true,
),
...
我不知道我是否在某处遗漏了什么。