The integration of ThinkPHP with FIREPHP and 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. action must have a view. here, we can use our imagination to finally integrate ThinkPHP with 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.?