Baron 2013-07-31 15:24:29 3240次浏览 1条回复 0 0 0

OS :ubutnu Framework : 1.1.13

使用 Yiic 自动生成代码 中间没有报错,但是少了 url 那个提示。在浏览器中手动输入 url 页面提示错误

以下是 Yiic 打印:

>> model users
  unchanged models/users.php
  unchanged fixtures/users.php
  unchanged unit/usersTest.php

The following model classes are successfully generated:
    users

If you have a 'db' database connection, you can test these models now with:
    $model=users::model()->find();
    print_r($model);

>> crud users
  unchanged UsersController.php
  unchanged usersTest.php
  unchanged create.php
  unchanged update.php
  unchanged index.php
  unchanged view.php

>> exit

以下是页面错误提示: url = "http://127.0.0.1/yii_test/index.php?r=users"

PHP warning

require(): Filename cannot be empty

/home/netdir/apache2/Yii/framework/web/CBaseController.php(130)

118         if(is_array($_data_))
119             extract($_data_,EXTR_PREFIX_SAME,'data');
120         else
121             $data=$_data_;
122         if($_return_)
123         {
124             ob_start();
125             ob_implicit_flush(false);
126             require($_viewFile_);
127             return ob_get_clean();
128         }
129         else
130             require($_viewFile_);
131     }
132 
133     /**
134      * Creates a widget and initializes it.
135      * This method first creates the specified widget instance.
136      * It then configures the widget's properties with the given initial values.
137      * At the end it calls {@link CWidget::init} to initialize the widget.
138      * Starting from version 1.1, if a {@link CWidgetFactory widget factory} is enabled,
139      * this method will use the factory to create the widget, instead.
140      * @param string $className class name (can be in path alias format)
141      * @param array $properties initial property values
142      * @return CWidget the fully initialized widget instance.
您需要登录后才可以回复。登录 | 立即注册