blob: af6af85bcdef0c70c104bdcff65ad04c551be37a [file] [log] [blame]
darwineld8bef8a2014-02-11 20:13:22 +01001<?php
Derek Jonesf4a4bd82011-10-20 12:18:42 -05002/**
3 * CodeIgniter
4 *
Phil Sturgeon07c1ac82012-03-09 17:03:37 +00005 * An open source application development framework for PHP 5.2.4 or newer
Derek Jonesf4a4bd82011-10-20 12:18:42 -05006 *
Andrey Andreevbdb96ca2014-10-28 00:13:31 +02007 * This content is released under the MIT License (MIT)
Andrey Andreeve734b382012-03-26 13:42:36 +03008 *
Andrey Andreevbdb96ca2014-10-28 00:13:31 +02009 * Copyright (c) 2014, British Columbia Institute of Technology
Andrey Andreeve734b382012-03-26 13:42:36 +030010 *
Andrey Andreevbdb96ca2014-10-28 00:13:31 +020011 * 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 Jonesf4a4bd82011-10-20 12:18:42 -050017 *
Andrey Andreevbdb96ca2014-10-28 00:13:31 +020018 * 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
darwinel871754a2014-02-11 17:34:57 +010031 * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
Andrey Andreevbdb96ca2014-10-28 00:13:31 +020032 * @copyright Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
33 * @license http://opensource.org/licenses/MIT MIT License
34 * @link http://codeigniter.com
35 * @since Version 1.0.0
Derek Jonesf4a4bd82011-10-20 12:18:42 -050036 * @filesource
37 */
darwineld8bef8a2014-02-11 20:13:22 +010038defined('BASEPATH') OR exit('No direct script access allowed');
Derek Allard2067d1a2008-11-13 22:59:24 +000039
40/*
41|--------------------------------------------------------------------------
42| File and Directory Modes
43|--------------------------------------------------------------------------
44|
45| These prefs are used when checking and setting modes when working
Derek Jones37f4b9c2011-07-01 17:56:50 -050046| with the file system. The defaults are fine on servers with proper
Derek Allard2067d1a2008-11-13 22:59:24 +000047| security, but you may wish (or even need) to change the values in
48| certain environments (Apache running a separate process for each
Derek Jones37f4b9c2011-07-01 17:56:50 -050049| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
Derek Allard2067d1a2008-11-13 22:59:24 +000050| always be used to set the mode correctly.
51|
52*/
53define('FILE_READ_MODE', 0644);
54define('FILE_WRITE_MODE', 0666);
55define('DIR_READ_MODE', 0755);
Andrey Andreev45965742014-08-27 20:40:11 +030056define('DIR_WRITE_MODE', 0755);
Derek Allard2067d1a2008-11-13 22:59:24 +000057
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.88dabf12012-09-03 01:46:30 -030067define('FOPEN_READ', 'rb');
68define('FOPEN_READ_WRITE', 'r+b');
69define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
70define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
71define('FOPEN_WRITE_CREATE', 'ab');
72define('FOPEN_READ_WRITE_CREATE', 'a+b');
73define('FOPEN_WRITE_CREATE_STRICT', 'xb');
74define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
Derek Allard2067d1a2008-11-13 22:59:24 +000075
Timothy Warren9a902cb2011-10-18 04:06:29 -040076/*
77|--------------------------------------------------------------------------
78| Display Debug backtrace
79|--------------------------------------------------------------------------
80|
Andrey Andreeve734b382012-03-26 13:42:36 +030081| 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 Warren9a902cb2011-10-18 04:06:29 -040083| of this setting
84|
85*/
Timothy Warren5160cc92011-10-18 06:50:06 -040086define('SHOW_DEBUG_BACKTRACE', TRUE);
Timothy Warren9a902cb2011-10-18 04:06:29 -040087
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070088/*
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 Hunsaker50dfe012013-03-04 02:05:20 -070095| broad conventions. Three such conventions are mentioned below, for
Andrey Andreev0760a442013-09-23 13:59:46 +030096| those who wish to make use of them. The CodeIgniter defaults were
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070097| chosen for the least overlap with these conventions, while still
98| leaving room for others to be defined in future versions and user
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070099| applications.
Andrey Andreev0760a442013-09-23 13:59:46 +0300100|
Daniel Hunsaker50dfe012013-03-04 02:05:20 -0700101| 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 Hunsaker3b5b7f42013-02-22 19:17:56 -0700111|
112*/
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700113define('EXIT_SUCCESS', 0); // no errors
Daniel Hunsaker50dfe012013-03-04 02:05:20 -0700114define('EXIT_ERROR', 1); // generic error
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700115define('EXIT_CONFIG', 3); // configuration error
Daniel Hunsaker50dfe012013-03-04 02:05:20 -0700116define('EXIT_UNKNOWN_FILE', 4); // file not found
117define('EXIT_UNKNOWN_CLASS', 5); // unknown class
118define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700119define('EXIT_USER_INPUT', 7); // invalid user input
120define('EXIT_DATABASE', 8); // database error
121define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
122define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
Derek Allard2067d1a2008-11-13 22:59:24 +0000123
124/* End of file constants.php */
Derek Jonesf0b39942010-03-25 10:08:20 -0500125/* Location: ./application/config/constants.php */