1.使用场合
在做ajax的时候,用于调试php
2.安装
1)在firefox上安装firebug再安装firephp
2到http://www.firephp.org/下载FirePHPCore,这个是php要用的
3.使用
require('FirePHPCore/fb.php');
ob_start();
//使用
/*
fb函数:参数一为需要显示的任意值(string|array|integer…)
参数二如果不是类型时,则为这行的标签。例fb(’string’,'label’,FirePHP::LOG)
则在console中显示为 label:string
*/
fb('Hello World'); /* Defaults to FirePHP::LOG */fb('Log message' ,FirePHP::LOG);fb('Info message' ,FirePHP::INFO);fb('Warn message' ,FirePHP::WARN);fb('Error message',FirePHP::ERROR);fb('Error message',FirePHP::trace);
/* FirePHP::TABLE 会在console中显示出一个表格. 参数一的数组下标0的值为要显示的标题
参数一的数组下标1的值为要显示的行的信息*/fb(array('2 SQL queries took 0.06 seconds',array( array('SQL Statement','Time','Result'), array('SELECT * FROM Foo','0.02',array('row1','row2')), array('SELECT * FROM Bar','0.04',array('row1','row2')) )),FirePHP::TABLE);