注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

淘尽网 官方博客

淘尽网http://www.tao3w.com做最好的比价网站

 
 
 

日志

 
 
关于我

淘尽网 http://www.tao3w.com 做最好的比价网站,做最好的数据抓取专家。

网易考拉推荐

网站生产环境如何调试PHP  

2014-12-10 23:57:54|  分类: PHP |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
使用firephp即可调试
必须先装firebug,然后再装firephp,记住哦,没有firebug可不行哦,另外最新版本的firephp已经在浏览器上不出现图标了,就是那个绿色的小虫子。
下面show一下,firephp的使用方法
Let's go over the basics

NOTE: The information below assumes you are using the FirePHPCore library. Please refer to the server libraries section in the wiki for information on how to log messages with 3rd party frameworks and libraries.

Setup

Let's assume your document root is /www/ and it is in your PHP include path.

Step 1    Locate the server library

Locate the /lib/FirePHPCore folder in the FirePHPCore archive and move it into your document root.

/www/FirePHPCore/fb.php
/www/FirePHPCore/FirePHP.class.php
/www/FirePHPCore/LICENSE

You can skip this step if you are using PEAR. Make sure the PEAR repository is in your include path.

Step 2    Include the server library

Create a file at /www/Index.php and open it in your editor.

require_once('FirePHPCore/FirePHP.class.php');

Step 3    Start output buffering

You can skip this step if the output_buffering php ini directive is set to On.

NOTE: The output buffer may NOT be flushed to the browser as long as you want to log messages with FirePHP. This is important as messages get sent in the response headers which must be sent prior to any page output.

Your first log message

$firephp = FirePHP::getInstance(true);
 
$var = array('i'=>10, 'j'=>20);
 
$firephp->log($var, 'Iterators');

Access Index.php via Firefox (e.g. http://localhost/Index.php)

Ensure your Firebug Net AND Console panels are enabled.

You should see something like this:

网站生产环境如何调试PHP - jjdoor - 淘尽网 官方博客

Note: The File and Line information will only show when you hover over the message.

Hovering over array(...) will show the Variable Viewer.
Click to pin it.

网站生产环境如何调试PHP - jjdoor - 淘尽网 官方博客

Clicking on the array keys will toggle the values.

http://www.firephp.org/HQ/Learn.htm
  评论这张
 
阅读(196)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017