Environment:
Firefox browser
Firebug
1. Install firephp directly in the Firefox add-ons search frephp then install and restart the browser.
2. Download Firephpcore libariry http://www.firephp.org/HQ/Install.htm
3. Introduction
Require_once (' firephp/fb.php ');//Introduction
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);
<?PHP/** * * * @authors Hanguang ([email protected]) * @date 2015-05-08 13:34:10 * @version 1.0*/Header("Content-type:text/html;charset=utf-8");require_once(' firephp/firephp.class.php ');$firephp= Firephp::getinstance (true);$firephp->setenabled (true);//false does not display, True displaysrequire_once(' firephp/fb.php ');Echo' Firephp test '; 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 (' Message with label ', ' label ', firephp::LOG); FB (Array(' key1 ' = ' val1 ', ' key2 ' =Array(Array(' v1 ', ' v2 '), ' v3 '), ' Testarray ', firephp::LOG); functionTest$ARG 1) { Throw New Exception(' Test Exception ');}Try{Test (Array(' Hello ' = ' world '));} Catch(Exception $e) { /*Log exception including stack trace & variables*/FB ($e);} 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); ?>
Specific API to see http://www.firephp.org/HQ/Use.htm
firephp Small Test