You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
4.2 KiB

7 years ago
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Display Debug backtrace
  6. |--------------------------------------------------------------------------
  7. |
  8. | If set to TRUE, a backtrace will be displayed along with php errors. If
  9. | error_reporting is disabled, the backtrace will not display, regardless
  10. | of this setting
  11. |
  12. */
  13. defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
  14. /*
  15. |--------------------------------------------------------------------------
  16. | File and Directory Modes
  17. |--------------------------------------------------------------------------
  18. |
  19. | These prefs are used when checking and setting modes when working
  20. | with the file system. The defaults are fine on servers with proper
  21. | security, but you may wish (or even need) to change the values in
  22. | certain environments (Apache running a separate process for each
  23. | user, PHP under CGI with Apache suEXEC, etc.). Octal values should
  24. | always be used to set the mode correctly.
  25. |
  26. */
  27. defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
  28. defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
  29. defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
  30. defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
  31. /*
  32. |--------------------------------------------------------------------------
  33. | File Stream Modes
  34. |--------------------------------------------------------------------------
  35. |
  36. | These modes are used when working with fopen()/popen()
  37. |
  38. */
  39. defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
  40. defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
  41. defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
  42. defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
  43. defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
  44. defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
  45. defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
  46. defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
  47. /*
  48. |--------------------------------------------------------------------------
  49. | Exit Status Codes
  50. |--------------------------------------------------------------------------
  51. |
  52. | Used to indicate the conditions under which the script is exit()ing.
  53. | While there is no universal standard for error codes, there are some
  54. | broad conventions. Three such conventions are mentioned below, for
  55. | those who wish to make use of them. The CodeIgniter defaults were
  56. | chosen for the least overlap with these conventions, while still
  57. | leaving room for others to be defined in future versions and user
  58. | applications.
  59. |
  60. | The three main conventions used for determining exit status codes
  61. | are as follows:
  62. |
  63. | Standard C/C++ Library (stdlibc):
  64. | http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
  65. | (This link also contains other GNU-specific conventions)
  66. | BSD sysexits.h:
  67. | http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
  68. | Bash scripting:
  69. | http://tldp.org/LDP/abs/html/exitcodes.html
  70. |
  71. */
  72. defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
  73. defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
  74. defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
  75. defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
  76. defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
  77. defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
  78. defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
  79. defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
  80. defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
  81. defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code