diff options
Diffstat (limited to 'application/config/constants.php')
-rw-r--r-- | application/config/constants.php | 78 |
1 files changed, 61 insertions, 17 deletions
diff --git a/application/config/constants.php b/application/config/constants.php index 1185dbca0..5743ee8e5 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -1,4 +1,17 @@ -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); +<?php +defined('BASEPATH') OR exit('No direct script access allowed'); + +/* +|-------------------------------------------------------------------------- +| Display Debug backtrace +|-------------------------------------------------------------------------- +| +| If set to TRUE, a backtrace will be displayed along with php errors. If +| error_reporting is disabled, the backtrace will not display, regardless +| of this setting +| +*/ +defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE); putenv('HOME='.FCPATH); @@ -15,10 +28,10 @@ putenv('HOME='.FCPATH); | always be used to set the mode correctly. | */ -define('FILE_READ_MODE', 0644); -define('FILE_WRITE_MODE', 0666); -define('DIR_READ_MODE', 0755); -define('DIR_WRITE_MODE', 0777); +defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644); +defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666); +defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755); +defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); /* |-------------------------------------------------------------------------- @@ -28,16 +41,47 @@ define('DIR_WRITE_MODE', 0777); | These modes are used when working with fopen()/popen() | */ +defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); +defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); +defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care +defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care +defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); +defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); +defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); +defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); -define('FOPEN_READ', 'rb'); -define('FOPEN_READ_WRITE', 'r+b'); -define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care -define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care -define('FOPEN_WRITE_CREATE', 'ab'); -define('FOPEN_READ_WRITE_CREATE', 'a+b'); -define('FOPEN_WRITE_CREATE_STRICT', 'xb'); -define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); - - -/* End of file constants.php */ -/* Location: ./application/config/constants.php */
\ No newline at end of file +/* +|-------------------------------------------------------------------------- +| Exit Status Codes +|-------------------------------------------------------------------------- +| +| Used to indicate the conditions under which the script is exit()ing. +| While there is no universal standard for error codes, there are some +| broad conventions. Three such conventions are mentioned below, for +| those who wish to make use of them. The CodeIgniter defaults were +| chosen for the least overlap with these conventions, while still +| leaving room for others to be defined in future versions and user +| applications. +| +| The three main conventions used for determining exit status codes +| are as follows: +| +| Standard C/C++ Library (stdlibc): +| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html +| (This link also contains other GNU-specific conventions) +| BSD sysexits.h: +| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits +| Bash scripting: +| http://tldp.org/LDP/abs/html/exitcodes.html +| +*/ +defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors +defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error +defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error +defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found +defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class +defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member +defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input +defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error +defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code +defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |