Yii 1.0 在页面底部显示SQL语句
{config/main.php}
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=test_try',
'emulatePrepare' => true,
'username' => 'boy_test',
'password' => 'password',
'charset' => 'utf8',
'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 pages
array(
'class'=>'CWebLogRoute',
'levels'=>'trace',
'categories'=>'system.db.*',
),
),
),
留言