blob: e71097b6c5b49bff0fc64455459b01e3be2fb9aa [file] [log] [blame]
Andrey Andreeve734b382012-03-26 13:42:36 +03001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
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 *
7 * NOTICE OF LICENSE
Andrey Andreeve734b382012-03-26 13:42:36 +03008 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05009 * Licensed under the Academic Free License version 3.0
Andrey Andreeve734b382012-03-26 13:42:36 +030010 *
Derek Jones61df9062011-10-21 09:55:40 -050011 * This source file is subject to the Academic Free License (AFL 3.0) that is
Derek Jonesf4a4bd82011-10-20 12:18:42 -050012 * 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
Andrey Andreev80500af2013-01-01 08:16:53 +020021 * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/)
Derek Jonesf4a4bd82011-10-20 12:18:42 -050022 * @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 */
Derek Allard2067d1a2008-11-13 22:59:24 +000027
28/*
29|--------------------------------------------------------------------------
30| File and Directory Modes
31|--------------------------------------------------------------------------
32|
33| These prefs are used when checking and setting modes when working
Derek Jones37f4b9c2011-07-01 17:56:50 -050034| with the file system. The defaults are fine on servers with proper
Derek Allard2067d1a2008-11-13 22:59:24 +000035| security, but you may wish (or even need) to change the values in
36| certain environments (Apache running a separate process for each
Derek Jones37f4b9c2011-07-01 17:56:50 -050037| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
Derek Allard2067d1a2008-11-13 22:59:24 +000038| always be used to set the mode correctly.
39|
40*/
41define('FILE_READ_MODE', 0644);
42define('FILE_WRITE_MODE', 0666);
43define('DIR_READ_MODE', 0755);
44define('DIR_WRITE_MODE', 0777);
45
46/*
47|--------------------------------------------------------------------------
48| File Stream Modes
49|--------------------------------------------------------------------------
50|
51| These modes are used when working with fopen()/popen()
52|
53*/
54
D. Marshall Lemcoe Jr.88dabf12012-09-03 01:46:30 -030055define('FOPEN_READ', 'rb');
56define('FOPEN_READ_WRITE', 'r+b');
57define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
58define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
59define('FOPEN_WRITE_CREATE', 'ab');
60define('FOPEN_READ_WRITE_CREATE', 'a+b');
61define('FOPEN_WRITE_CREATE_STRICT', 'xb');
62define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
Derek Allard2067d1a2008-11-13 22:59:24 +000063
Timothy Warren9a902cb2011-10-18 04:06:29 -040064/*
65|--------------------------------------------------------------------------
66| Display Debug backtrace
67|--------------------------------------------------------------------------
68|
Andrey Andreeve734b382012-03-26 13:42:36 +030069| If set to TRUE, a backtrace will be displayed along with php errors. If
70| error_reporting is disabled, the backtrace will not display, regardless
Timothy Warren9a902cb2011-10-18 04:06:29 -040071| of this setting
72|
73*/
Timothy Warren5160cc92011-10-18 06:50:06 -040074define('SHOW_DEBUG_BACKTRACE', TRUE);
Timothy Warren9a902cb2011-10-18 04:06:29 -040075
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070076/*
77|--------------------------------------------------------------------------
78| Exit Status Codes
79|--------------------------------------------------------------------------
80|
81| Used to indicate the conditions under which the script is exit()ing.
82| While there is no universal standard for error codes, there are some
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070083| broad conventions. Three such conventions are mentioned below, for
Andrey Andreev0760a442013-09-23 13:59:46 +030084| those who wish to make use of them. The CodeIgniter defaults were
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070085| chosen for the least overlap with these conventions, while still
86| leaving room for others to be defined in future versions and user
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070087| applications.
Andrey Andreev0760a442013-09-23 13:59:46 +030088|
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070089| The three main conventions used for determining exit status codes
90| are as follows:
91|
92| Standard C/C++ Library (stdlibc):
93| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
94| (This link also contains other GNU-specific conventions)
95| BSD sysexits.h:
96| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
97| Bash scripting:
98| http://tldp.org/LDP/abs/html/exitcodes.html
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070099|
100*/
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700101define('EXIT_SUCCESS', 0); // no errors
Daniel Hunsaker50dfe012013-03-04 02:05:20 -0700102define('EXIT_ERROR', 1); // generic error
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700103define('EXIT_CONFIG', 3); // configuration error
Daniel Hunsaker50dfe012013-03-04 02:05:20 -0700104define('EXIT_UNKNOWN_FILE', 4); // file not found
105define('EXIT_UNKNOWN_CLASS', 5); // unknown class
106define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700107define('EXIT_USER_INPUT', 7); // invalid user input
108define('EXIT_DATABASE', 8); // database error
109define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
110define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
Derek Allard2067d1a2008-11-13 22:59:24 +0000111
112/* End of file constants.php */
Derek Jonesf0b39942010-03-25 10:08:20 -0500113/* Location: ./application/config/constants.php */