1、在application/config/config.php中设置: $config['log_threshold'] = 1//(可设置:1/2/3/4) 如果为0表示不输出错误日志,具体可查看里面的介绍; 2、在需要写入错误的页面调用全局函数log_message('级别','消息'),级别有三个,一是error,即php运行错误,二是debug,系统调试,CI本身在很多页面也
| 1 = Error Messages (including PHP errors) | 2 = Debug Messages | 3 = Informational Messages | 4 = All Messages | | For a live site you'll usually only enable Errors (1) to be logged otherwise | your log files will fill up very fast. | */ $config['log_threshold'] = 4; 1...
| array(2)=Debug Message, without Error Messages | For a live site you'll usually only enable Errors (1) to be logged otherwise | your log files will fill up very fast. | */ $config['log_threshold']=0; 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 1...
你可以通过log_message()方法将信息记录在本地日志文件中,并且必须在第一个参数中指定错误的”级别”,来表明这个信息的类型(debug,error等)。 第二个参数就是信息本身: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 if($some_var==''){log_message('error','Some variable did not contain a value....
1 摘要 这篇笔记主要介绍基于飞思卡尔软件开发平台(Software Development Kit)的应用软件开发,以IAR 为...
log_message('info', 'Helper loaded: '.$helper); break; } } // unable to load the helper if ( ! isset($this->_ci_helpers[$helper])) { show_error('Unable to load the requested file: helpers/'.$helper.'.php'); } } return $this; ...
You can log information to the local log files by using the log_message() method. You must supply the “level” of the error in the first parameter, indicating what type of message it is (debug, error, etc). The second parameter is the message itself: <?php if ($some_var === '...
Added Windows 7, Windows 8, Windows 8.1, Android, Blackberry, iOS and PlayStation 3 to the list of user platforms. Added Fennec (Firefox for mobile) to the list of mobile user agents. Ability to log certain error types, not all under a threshold. Added support for pem, p10, p12, p7...
log_message('error', "Unable to write cache file: ".$cache_path);return; }$uri=$CI->config->item('base_url').$CI->config->item('index_page').$CI->uri->uri_string();$cache_path.=md5($uri);if( !$fp= @fopen($cache_path,FOPEN_WRITE_CREATE_DESTRUCTIVE)) ...
fix: Parse error occurs before PHP version check by @kenjis in #6327 fix: 404 page might display Exception message in production environment by @kenjis in #6333 Refactoring refactor: replace $e->getMessage() with $e in log_message() by @kenjis in #6182 ...