码迷,mamicode.com
首页 > 其他好文 > 详细

Yii调试插件yii-debug-toolbar的使用

时间:2018-02-25 11:12:00      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:gpo   work   bar   class   har   解压   ram   file   下载地址   

yii-debug-toolbar 下载地址
yii-debug-toolbar下载

配置方法

下载完成后将文件拖至\project\protected\extensions目录下,解压到当前文件夹;

db配置

// db配置添加enableProfiling与enableParamLogging参数:
‘db‘=>array(
            ‘connectionString‘ => ‘mysql:host=localhost;dbname=yiidemo‘,
            ‘emulatePrepare‘ => true,
            ‘username‘ => ‘root‘,
            ‘password‘ => ‘‘,
            ‘charset‘ => ‘utf8‘,
            ‘tablePrefix‘ => ‘tbl_‘,
            ‘enableProfiling‘=>true, //分析sql语句
            ‘enableParamLogging‘=>true, //日志中显示每次传参的参数
        ),

log配置

// log配置,注释routes的class,替换为yii-debug-toolbar,配置ipFilters。
‘log‘=>array(
            ‘class‘=>‘CLogRouter‘,
            ‘routes‘=>array(
                array(
                    //‘class‘=>‘CFileLogRoute‘,
                    ‘class‘=>‘ext.yii-debug-toolbar.YiiDebugToolbarRoute‘,
                    ‘levels‘=>‘error, warning‘,
                    ‘ipFilters‘=>array(‘127.0.0.1‘,‘*‘), //配置可以查看debug面板的ip
                ),
            ),
        ),

Yii调试插件yii-debug-toolbar的使用

标签:gpo   work   bar   class   har   解压   ram   file   下载地址   

原文地址:https://www.cnblogs.com/hanpengyu/p/8468611.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!