define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
语法
|
show_error($message, $status_code, $heading = '遇到错误') |
Parameters
|
$message (mixed)-错误信息 $status_code (int)-HTTP 响应状态代码 $heading (string)-错误页面标题 |
Return Type
|
mixed |
语法
|
show_404($page = '', $log_error = TRUE) |
Parameters
|
$page (string) – URI 字符串 $log_error (bool) – 是否记录错误 |
Return Type
|
void |
语法
|
log_message($level, $message, $php_error = FALSE) |
Parameters
|
$level (string)-日志级别:"错误"、"调试"或"信息" $message (string)-要记录的消息 $php_error (bool)-是否记录原生 PHP 错误消息 |
Return Type
|
void |
/* |-------------------------------------------------------------------------------- | Error Logging Threshold |-------------------------------------------------------------------------------- | You can enable error logging by setting a threshold over zero. The | threshold determines what gets logged. Threshold options are: | | 0 = Disable logging, Error logging TURNED OFF | 1 = Error Message (including PHP errors) | 2 = Debug Message | 3 = Informational Messages | 4 = All Messages | | You can also pass an array with threshold levels to show individual error types | | 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;