Yii Framework 1.1 使用 Bootstrap

2350阅读 0评论2016-02-17 a741423206
分类:PHP

相关官网教程以及下载地址:

安装后遇到表单页面无法访问,目前网上没找到相关解决教程,特把解决过程记录于此。


1.错误一 Declaration of BActiveForm::checkBox() should be compatible with CActiveForm::checkBox($model, $attribute, $htmlOptions = Array)






解决方法:

1.修改 protected/extensions/bootstrap-theme/widgets/BActiveForm.php 的 234行

点击(此处)折叠或打开

  1. public function checkBox(CModel $model, $attribute, $htmlOptions=array()) {

点击(此处)折叠或打开

  1. public function checkBox($model, $attribute, $htmlOptions=array()) {


2.下面一个函数同理

点击(此处)折叠或打开

  1. public function labelEx(CModel $model, $attribute, $htmlOptions=array())



点击(此处)折叠或打开

  1. public function labelEx($model, $attribute, $htmlOptions=array())

错误二:Declaration of BHtml::linkButton() should be compatible with CHtml::linkButton($label = 'submit', $htmlOptions = Array)

修改:protected/extensions/bootstrap-theme/helpers/BHtml.php 199行

点击(此处)折叠或打开

  1. public static function linkButton($label, $url = '#', $htmlOptions = array()) {
  2. 改为下面
  3.     public static function linkButton($label='submit',$htmlOptions = array()) {


页面成功显示:



上一篇:Shadow socks 配置
下一篇:Chrome插件(Extensions)开发攻略