[] Integration of ThinkPHP with FIREPHP, haha & nbsp; tp debugging is really silly and difficult to use. to output trace information, the conditions are as follows: 1. set app_debug and show_page_trace to true, 2. the action must have a view. here, I realized my imagination and finally integrated firephp. hahaha, the method is as follows: [replace [] ThinkPHP and integrate FIREPHP.
Tp debugging is really silly and difficult to use. to output trace information, the conditions are as follows: 1. set app_debug and show_page_trace to true, 2. the action must have a view. here, I realized my imagination and finally integrated firephp. hahaha, the method is as follows: [replace thinkphp/lib/think/core/log. class. php] class put firephp. class. copy php to the thinkphp/lib/think/core directory and modify the following method: [We recommend that you back up the original file. this is only for testing.] static function record ($ message, $ level = self: err, $ record = false) {if ($ record | in_array ($ level, c ('log _ record_level '))) {$ now = date (self: $ format); self: $ log [] = "{$ now} {$ level }: {$ message} \ r \ n "; switch ($ level) {case self: debug: 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 SQL output, because thinkphp/lib/think/db. class. in php, Line 5 is dead of debugging parameters and must be bound to c ('app _ debug'). it is hard to understand. here, we modify it to add a custom one, does not conflict with the original one .. the code is as follows: if (c ('app _ debug') | c ('log _ record_ SQL ') make the following options in the configuration file: 'log _ record '=> true, // logs 'log _ record_ SQL' => true, // perform log record 'log _ record_level '=> array ('erg', 'Alert', 'crit', 'err', 'warn', 'notic ', 'info', 'debug', 'SQL'), // you can increase or decrease the log level that can be recorded.?