YII学习第二十二天,显示SQL详细信息在页脚
'db'=>array('connectionString' => 'mysql:host=localhost;dbname=test_try','emulatePrepare' => true,'username' => 'boy_test','password' => 'password','charset' => 'utf8', 'tablePrefix' => 'test_','enableProfiling'=>YII_DEBUG, //这行和下面一行是平时没有的,添加即可'enableParamLogging'=>YII_DEBUG,),'log'=>array('class'=>'CLogRouter','routes'=>array(array('class'=>'CFileLogRoute','levels'=>'error, warning',),// uncomment the following to show log messages on web pagesarray( //这个数组变量里面的值替换成这个就可以了'class'=>'CWebLogRoute', 'levels'=>'trace', 'categories'=>'system.db.*',),),),
?