We use: YIIDEBUGTB to debug (because with his interface is more beautiful, do not affect the other elements of the interface).
1. Download the YIIDEBUGTB and put it into the APPLICATION.EXTENSIONS.YIIDEBUGTB directory
2. Modify main.php and add the following code:
Copy Code code as follows:
' Log ' =>array (
' Class ' => ' Clogrouter ',
' Routes ' =>array (
Array
' Class ' => ' Cfilelogroute ',
' Levels ' => ' Error, Warning,trace ',
),
Here's the new plus
Array (//configuration for the toolbar
' Class ' => ' Xwebdebugrouter ',
' Config ' => ' alignleft, opaque, Runindebug, Fixedpos, collapsed, Yamlstyle ',
' Levels ' => ' Error, warning, trace, profile, info ',
' Categories ' => ' system.db.* ',
' Allowedips ' =>array (' 127.0.0.1 ', ':: 1 ', ' 192\.168\.1[0-5]\.[ 0-9]{3} ', ' If the program needs to fill in your public network IP ' in the net,
),
),
)
3.db link configuration inside to make the following modifications:
Copy Code code as follows:
' DB ' =>array (
' connectionString ' => ' mysql:host=*.*.*.*;d bname=test ',
' Emulateprepare ' =>true,//Join
' Enableparamlogging ' => true,//Join
' username ' => '-----',
' Password ' => '---',
' CharSet ' => ' UTF8 ',
' schemacachingduration ' => ' 0 ',
' AutoConnect ' =>false,
),
4. Complete
Such as: