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 | * |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 5 | * An open source application development framework for PHP |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 6 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 7 | * This content is released under the MIT License (MIT) |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 8 | * |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 9 | * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 10 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 11 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 12 | * of this software and associated documentation files (the "Software"), to deal |
| 13 | * in the Software without restriction, including without limitation the rights |
| 14 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 15 | * copies of the Software, and to permit persons to whom the Software is |
| 16 | * furnished to do so, subject to the following conditions: |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 17 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 18 | * The above copyright notice and this permission notice shall be included in |
| 19 | * all copies or substantial portions of the Software. |
| 20 | * |
| 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 22 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 24 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 25 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 26 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 27 | * THE SOFTWARE. |
| 28 | * |
| 29 | * @package CodeIgniter |
| 30 | * @author EllisLab Dev Team |
darwinel | 871754a | 2014-02-11 17:34:57 +0100 | [diff] [blame] | 31 | * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 32 | * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 33 | * @license http://opensource.org/licenses/MIT MIT License |
| 34 | * @link http://codeigniter.com |
| 35 | * @since Version 1.0.0 |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 36 | * @filesource |
| 37 | */ |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 39 | |
| 40 | /* |
| 41 | |-------------------------------------------------------------------------- |
| 42 | | File and Directory Modes |
| 43 | |-------------------------------------------------------------------------- |
| 44 | | |
| 45 | | These prefs are used when checking and setting modes when working |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 46 | | with the file system. The defaults are fine on servers with proper |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 47 | | security, but you may wish (or even need) to change the values in |
| 48 | | certain environments (Apache running a separate process for each |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 49 | | user, PHP under CGI with Apache suEXEC, etc.). Octal values should |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 50 | | always be used to set the mode correctly. |
| 51 | | |
| 52 | */ |
| 53 | define('FILE_READ_MODE', 0644); |
| 54 | define('FILE_WRITE_MODE', 0666); |
| 55 | define('DIR_READ_MODE', 0755); |
Andrey Andreev | 4596574 | 2014-08-27 20:40:11 +0300 | [diff] [blame] | 56 | define('DIR_WRITE_MODE', 0755); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 57 | |
| 58 | /* |
| 59 | |-------------------------------------------------------------------------- |
| 60 | | File Stream Modes |
| 61 | |-------------------------------------------------------------------------- |
| 62 | | |
| 63 | | These modes are used when working with fopen()/popen() |
| 64 | | |
| 65 | */ |
| 66 | |
D. Marshall Lemcoe Jr. | 88dabf1 | 2012-09-03 01:46:30 -0300 | [diff] [blame] | 67 | define('FOPEN_READ', 'rb'); |
| 68 | define('FOPEN_READ_WRITE', 'r+b'); |
| 69 | define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
| 70 | define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care |
| 71 | define('FOPEN_WRITE_CREATE', 'ab'); |
| 72 | define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
| 73 | define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
| 74 | define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 75 | |
Timothy Warren | 9a902cb | 2011-10-18 04:06:29 -0400 | [diff] [blame] | 76 | /* |
| 77 | |-------------------------------------------------------------------------- |
| 78 | | Display Debug backtrace |
| 79 | |-------------------------------------------------------------------------- |
| 80 | | |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 81 | | If set to TRUE, a backtrace will be displayed along with php errors. If |
| 82 | | error_reporting is disabled, the backtrace will not display, regardless |
Timothy Warren | 9a902cb | 2011-10-18 04:06:29 -0400 | [diff] [blame] | 83 | | of this setting |
| 84 | | |
| 85 | */ |
Timothy Warren | 5160cc9 | 2011-10-18 06:50:06 -0400 | [diff] [blame] | 86 | define('SHOW_DEBUG_BACKTRACE', TRUE); |
Timothy Warren | 9a902cb | 2011-10-18 04:06:29 -0400 | [diff] [blame] | 87 | |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 88 | /* |
| 89 | |-------------------------------------------------------------------------- |
| 90 | | Exit Status Codes |
| 91 | |-------------------------------------------------------------------------- |
| 92 | | |
| 93 | | Used to indicate the conditions under which the script is exit()ing. |
| 94 | | While there is no universal standard for error codes, there are some |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 95 | | broad conventions. Three such conventions are mentioned below, for |
Andrey Andreev | 0760a44 | 2013-09-23 13:59:46 +0300 | [diff] [blame] | 96 | | those who wish to make use of them. The CodeIgniter defaults were |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 97 | | chosen for the least overlap with these conventions, while still |
| 98 | | leaving room for others to be defined in future versions and user |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 99 | | applications. |
Andrey Andreev | 0760a44 | 2013-09-23 13:59:46 +0300 | [diff] [blame] | 100 | | |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 101 | | The three main conventions used for determining exit status codes |
| 102 | | are as follows: |
| 103 | | |
| 104 | | Standard C/C++ Library (stdlibc): |
| 105 | | http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html |
| 106 | | (This link also contains other GNU-specific conventions) |
| 107 | | BSD sysexits.h: |
| 108 | | http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits |
| 109 | | Bash scripting: |
| 110 | | http://tldp.org/LDP/abs/html/exitcodes.html |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 111 | | |
| 112 | */ |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 113 | define('EXIT_SUCCESS', 0); // no errors |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 114 | define('EXIT_ERROR', 1); // generic error |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 115 | define('EXIT_CONFIG', 3); // configuration error |
Daniel Hunsaker | 50dfe01 | 2013-03-04 02:05:20 -0700 | [diff] [blame] | 116 | define('EXIT_UNKNOWN_FILE', 4); // file not found |
| 117 | define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
| 118 | define('EXIT_UNKNOWN_METHOD', 6); // unknown class member |
Daniel Hunsaker | 3b5b7f4 | 2013-02-22 19:17:56 -0700 | [diff] [blame] | 119 | define('EXIT_USER_INPUT', 7); // invalid user input |
| 120 | define('EXIT_DATABASE', 8); // database error |
| 121 | define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
| 122 | define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 123 | |
| 124 | /* End of file constants.php */ |
Derek Jones | f0b3994 | 2010-03-25 10:08:20 -0500 | [diff] [blame] | 125 | /* Location: ./application/config/constants.php */ |