darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 1 | <?php |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Phil Sturgeon | 07c1ac8 | 2012-03-09 17:03:37 +0000 | [diff] [blame] | 5 | * An open source application development framework for PHP 5.2.4 or newer |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 6 | * |
| 7 | * NOTICE OF LICENSE |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 8 | * |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 9 | * Licensed under the Academic Free License version 3.0 |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 10 | * |
Derek Jones | 61df906 | 2011-10-21 09:55:40 -0500 | [diff] [blame] | 11 | * This source file is subject to the Academic Free License (AFL 3.0) that is |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 12 | * bundled with this package in the files license_afl.txt / license_afl.rst. |
| 13 | * It is also available through the world wide web at this URL: |
| 14 | * http://opensource.org/licenses/AFL-3.0 |
| 15 | * If you did not receive a copy of the license and are unable to obtain it |
| 16 | * through the world wide web, please send an email to |
| 17 | * licensing@ellislab.com so we can send you a copy immediately. |
| 18 | * |
| 19 | * @package CodeIgniter |
| 20 | * @author EllisLab Dev Team |
darwinel | 871754a | 2014-02-11 17:34:57 +0100 | [diff] [blame] | 21 | * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 22 | * @license http://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0) |
| 23 | * @link http://codeigniter.com |
| 24 | * @since Version 1.0 |
| 25 | * @filesource |
| 26 | */ |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 27 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 28 | |
| 29 | /* |
| 30 | |-------------------------------------------------------------------------- |
| 31 | | File and Directory Modes |
| 32 | |-------------------------------------------------------------------------- |
| 33 | | |
| 34 | | These prefs are used when checking and setting modes when working |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 35 | | with the file system. The defaults are fine on servers with proper |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 36 | | security, but you may wish (or even need) to change the values in |
| 37 | | certain environments (Apache running a separate process for each |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 38 | | user, PHP under CGI with Apache suEXEC, etc.). Octal values should |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 39 | | always be used to set the mode correctly. |
| 40 | | |
| 41 | */ |
| 42 | define('FILE_READ_MODE', 0644); |
| 43 | define('FILE_WRITE_MODE', 0666); |
| 44 | define('DIR_READ_MODE', 0755); |
Andrey Andreev | 4596574 | 2014-08-27 20:40:11 +0300 | [diff] [blame^] | 45 | define('DIR_WRITE_MODE', 0755); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 46 | |
| 47 | /* |
| 48 | |-------------------------------------------------------------------------- |
| 49 | | File Stream Modes |
| 50 | |-------------------------------------------------------------------------- |
| 51 | | |
| 52 | | These modes are used when working with fopen()/popen() |
| 53 | | |
| 54 | */ |
| 55 | |
D. Marshall Lemcoe Jr. | 88dabf1 | 2012-09-03 01:46:30 -0300 | [diff] [blame] | 56 | define('FOPEN_READ', 'rb'); |
| 57 | define('FOPEN_READ_WRITE', 'r+b'); |
| 58 | define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
| 59 | define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care |
| 60 | define('FOPEN_WRITE_CREATE', 'ab'); |
| 61 | define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
| 62 | define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
| 63 | define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 64 | |
Timothy Warren | 9a902cb | 2011-10-18 04:06:29 -0400 | [diff] [blame] | 65 | /* |
| 66 | |-------------------------------------------------------------------------- |
| 67 | | Display Debug backtrace |
| 68 | |-------------------------------------------------------------------------- |
| 69 | | |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 70 | | If set to TRUE, a backtrace will be displayed along with php errors. If |
| 71 | | error_reporting is disabled, the backtrace will not display, regardless |
Timothy Warren | 9a902cb | 2011-10-18 04:06:29 -0400 | [diff] [blame] | 72 | | of this setting |
| 73 | | |
| 74 | */ |
Timothy Warren | 5160cc9 | 2011-10-18 06:50:06 -0400 | [diff] [blame] | 75 | define('SHOW_DEBUG_BACKTRACE', TRUE); |
Timothy Warren | 9a902cb | 2011-10-18 04:06:29 -0400 | [diff] [blame] | 76 | |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 77 | /* |
| 78 | |-------------------------------------------------------------------------- |
| 79 | | Exit Status Codes |
| 80 | |-------------------------------------------------------------------------- |
| 81 | | |
| 82 | | Used to indicate the conditions under which the script is exit()ing. |
| 83 | | While there is no universal standard for error codes, there are some |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 84 | | broad conventions. Three such conventions are mentioned below, for |
Andrey Andreev | 0760a44 | 2013-09-23 13:59:46 +0300 | [diff] [blame] | 85 | | those who wish to make use of them. The CodeIgniter defaults were |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 86 | | chosen for the least overlap with these conventions, while still |
| 87 | | leaving room for others to be defined in future versions and user |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 88 | | applications. |
Andrey Andreev | 0760a44 | 2013-09-23 13:59:46 +0300 | [diff] [blame] | 89 | | |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 90 | | The three main conventions used for determining exit status codes |
| 91 | | are as follows: |
| 92 | | |
| 93 | | Standard C/C++ Library (stdlibc): |
| 94 | | http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html |
| 95 | | (This link also contains other GNU-specific conventions) |
| 96 | | BSD sysexits.h: |
| 97 | | http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits |
| 98 | | Bash scripting: |
| 99 | | http://tldp.org/LDP/abs/html/exitcodes.html |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 100 | | |
| 101 | */ |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 102 | define('EXIT_SUCCESS', 0); // no errors |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 103 | define('EXIT_ERROR', 1); // generic error |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 104 | define('EXIT_CONFIG', 3); // configuration error |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 105 | define('EXIT_UNKNOWN_FILE', 4); // file not found |
| 106 | define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
| 107 | define('EXIT_UNKNOWN_METHOD', 6); // unknown class member |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 108 | define('EXIT_USER_INPUT', 7); // invalid user input |
| 109 | define('EXIT_DATABASE', 8); // database error |
| 110 | define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
| 111 | define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 112 | |
| 113 | /* End of file constants.php */ |
Derek Jones | f0b3994 | 2010-03-25 10:08:20 -0500 | [diff] [blame] | 114 | /* Location: ./application/config/constants.php */ |