
开启yii 自带的调试模式 (推荐学习:yii框架)
main.php
开启调试模式:
define('YII_DEBUG', true); //是否调试BUG,本地测试请打开defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
增加日志配置:
'log' => array( 'class' => 'CLogRouter', 'routes' => array( array( 'class' => 'CFileLogRoute', 'levels' => 'error, warning', ), array( 'class'=>'CWebLogRoute', 'levels'=>'trace',//提示的级别 'categories'=>'system.db.*', ), ),),
以上就是yii如何开启调试模式的知识。速戳>>知识兔学习精品课!