echoer 2012-05-15 02:39:20 6569次浏览 7条回复 0 0 0

刚刚学习yii,请多多关照
配好mysql,gii,能进gii的其它generator 进model generator时直接无法显示此网页 (101) 找了很时间的原因,也没找到,求帮助

[attach]716[/attach][attach]717[/attach]

'modules'=>array(
    // uncomment the following to enable the Gii tool
    'gii'=>array(
        'class'=>'system.gii.GiiModule',
        'password'=>'123456',
        // If removed, Gii defaults to localhost only. Edit carefully to taste.
        //'ipFilters'=>array('127.0.0.1','::1'),
    ),	
),
// application components
'components'=>array(
    'user'=>array(
        // enable cookie-based authentication
        'allowAutoLogin'=>true,
    ),

    'db'=>array(
        'connectionString' => 'mysql:host=localhost;dbname=mysql',
        'emulatePrepare' => true,
        'username' => 'root',
        'password' => '123456',
        'charset' => 'utf8',
        'tablePrefix' => 'b3_' ,
    ),
  • 回复于 2012-09-11 09:15 举报

    话说我也遇到了,亲,不降低数据库的版本行吗,求其他解决之道。

  • 回复于 2012-08-02 16:17 举报

    我的yii登录不进去。这是怎么回事啊?老是回到这个url地址:http://www.fenhon.com/jiesaiscada/index.php?r=gii/default/login

  • 回复于 2012-05-15 20:25 举报

    ipFiters 是ip过滤吧,本来只能本机访问gii 注释掉了的话那就是 谁都可以访问gii,貌似是这样。。

  • 回复于 2012-05-15 14:36 举报

    解决了就好~~
    另外,我怎么看到 //'ipFilters'=>array('127.0.0.1','::1'), 是注释掉的?

    注释掉了,默认的就是localhost么?

  • 回复于 2012-05-15 13:54 举报

    有时候问题确实很古怪,没办法~

  • 回复于 2012-05-15 13:52 举报

    谢谢楼上,自己建了个数据库,用来连接,但还是不行。然后一冲动换了下mysql版本 从5.1.501降回了5.0.90,然后就好了~~~

  • 回复于 2012-05-15 12:04 举报

    估计你的数据库有问题,那个 “dbname=mysql” mysql数据库是内部数据库,你链接它干嘛,我不信你的mysql数据库里有以"b3_"开头的数据表。
    访问"r=gii"是不需要链接数据库的,但是访问 "r=gii/model" 是需要查询数据库的,所以前面的能访问后面的不能访问极有可能是数据库有问题。

您需要登录后才可以回复。登录 | 立即注册