我的debug配置文件出了问题!

浏览:677 发布日期:2012/12/27 分类:求助交流
如果config.php里面没定义的参数,在debug中定义就没问题
如果在config.php定义了的参数,再从debu.php定义就无效了!

config.phpreturn array(
    'APP_STATUS' => 'debug',
    'URL_MODEL'=>2,
    'DB_TYPE'=>'mysql',
    'DB_HOST'=>'localhost',
    'DB_NAME'=>'abcd',
    'DB_USER'=>'root',
    'DB_PWD'=>'123456',
    'DB_PORT'=>'3306',
    'DB_PREFIX'=>'xxxx_',
    'SHOW_ERROR_MSG'=>true,
    'VAR_PAGE' => 'page',
    
    'APP_GROUP_LIST'=>'manage',
    'DEFAULT_GROUP'=>'',
    'DEFAULT_MODULE'=>'Index',
);
debug.phpreturn array(
    'DB_USER'=>'root',
    'DB_PWD'=>'jqka',
    'DB_PORT'=>'6',
    'HAHA'=>'en',
);
在IndexAction.class中    public function go()
    {
        echo C('DB_PORT');
        echo C('DB_PWD');
        echo C('HAHA');
        die;
    }
输出的分别是:3306、123456、en


最佳答案
评论() 相关
后面还有条评论,点击查看>>