我无法在 yii 模型生成器中创建模型。(Windows 上的 Xamp)我按照http://www.yiiframework.com/forum/index.php/topic/32415-create-login-form/中的步骤操作
我在 config/main.php 文件中进行了更改...将数据库名称粘贴到那里“作为测试”。我在我的数据库“test”中创建了一个用户表。使用 gii 时..它没有创建模型并向我显示错误
错误表“用户”不存在。
我不知道我错过了什么。
这是我的 config/main.php 文件视图
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'gii',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
),
/*
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/test.db',
),*/
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=test',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),