[] thinkphp integrated firephp hehe
TP debugging is really silly difficult to use, to output trace information, the condition is as follows: 1. App_debug and Show_page_trace are set to true,2. Action must have a view before you can play your own imagination. Finally, the firephp integrated into the, Ha ha, the method is as follows: [is to replace the thinkphp/lib/think/core/log.class.php] class firephp.class.php Copy to the Thinkphp/lib/think/core directory, modify the following method: [recommended to back up the original file Oh, this is only for testing use]static function record ($message, $level =self::err, $record =false) {if ($record | | | In_array ($level, C (' Log_record_level '))) {$now = date (self:: $f Ormat); Self:: $log [] = "{$now} {$level}: {$message}\r\n"; Switch ($level) {case self::d ebug:firephp::getinstance (True)->trace ($message, $level); Break Case Self::info:firephp::getinstance (True)->log ($message, $level); Break Case Self::sql:firephp::getinstance (True)->info ($message, $level); Break Case Self::notice:case Self::warn:firephp::getinstance (True)->warn ($message, $level); Break Default:firephp::getinstance (True)->error ($message, $level); Break }}} for the output of SQL, because Thinkphp/lib/think/db/db.class.php inside the 128th line to debug parameters written dead, it must be bound with C (' App_debug '), it is difficult to understand, here is modified to add a custom, do not conflict with the original. The code is as follows: if (C (' App_debug ') | | c (' log_record_sql ')) in the configuration file, the following options are available: ' Log_record ' =>true,//logging ' log_record_sql ' = >true,//logging ' log_record_level ' = = Array (' Emerg ', ' alert ', ' crit ', ' err ', ' warn ', ' notic ', ' info ', ' Debug ', ' SQL ' ),//Allow logging level logging level can be self-increment or decrease hehe?