blob: 239fd46fbe91767e8c83aa66b60b954820de9123 [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 *
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
darwinel871754a2014-02-11 17:34:57 +010021 * @copyright Copyright (c) 2008 - 2014, 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 */
darwineld8bef8a2014-02-11 20:13:22 +010027defined('BASEPATH') OR exit('No direct script access allowed');
Derek Allard2067d1a2008-11-13 22:59:24 +000028
29/*
30|--------------------------------------------------------------------------
31| File and Directory Modes
32|--------------------------------------------------------------------------
33|
34| These prefs are used when checking and setting modes when working
Derek Jones37f4b9c2011-07-01 17:56:50 -050035| with the file system. The defaults are fine on servers with proper
Derek Allard2067d1a2008-11-13 22:59:24 +000036| security, but you may wish (or even need) to change the values in
37| certain environments (Apache running a separate process for each
Derek Jones37f4b9c2011-07-01 17:56:50 -050038| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
Derek Allard2067d1a2008-11-13 22:59:24 +000039| always be used to set the mode correctly.
40|
41*/
42define('FILE_READ_MODE', 0644);
43define('FILE_WRITE_MODE', 0666);
44define('DIR_READ_MODE', 0755);
45define('DIR_WRITE_MODE', 0777);
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.88dabf12012-09-03 01:46:30 -030056define('FOPEN_READ', 'rb');
57define('FOPEN_READ_WRITE', 'r+b');
58define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
59define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
60define('FOPEN_WRITE_CREATE', 'ab');
61define('FOPEN_READ_WRITE_CREATE', 'a+b');
62define('FOPEN_WRITE_CREATE_STRICT', 'xb');
63define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
Derek Allard2067d1a2008-11-13 22:59:24 +000064
Timothy Warren9a902cb2011-10-18 04:06:29 -040065/*
66|--------------------------------------------------------------------------
67| Display Debug backtrace
68|--------------------------------------------------------------------------
69|
Andrey Andreeve734b382012-03-26 13:42:36 +030070| 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 Warren9a902cb2011-10-18 04:06:29 -040072| of this setting
73|
74*/
Timothy Warren5160cc92011-10-18 06:50:06 -040075define('SHOW_DEBUG_BACKTRACE', TRUE);
Timothy Warren9a902cb2011-10-18 04:06:29 -040076
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070077/*
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 Hunsaker50dfe012013-03-04 02:05:20 -070084| broad conventions. Three such conventions are mentioned below, for
Andrey Andreev0760a442013-09-23 13:59:46 +030085| those who wish to make use of them. The CodeIgniter defaults were
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -070086| chosen for the least overlap with these conventions, while still
87| leaving room for others to be defined in future versions and user
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070088| applications.
Andrey Andreev0760a442013-09-23 13:59:46 +030089|
Daniel Hunsaker50dfe012013-03-04 02:05:20 -070090| 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 Hunsaker3b5b7f42013-02-22 19:17:56 -0700100|
101*/
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700102define('EXIT_SUCCESS', 0); // no errors
Daniel Hunsaker50dfe012013-03-04 02:05:20 -0700103define('EXIT_ERROR', 1); // generic error
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700104define('EXIT_CONFIG', 3); // configuration error
Daniel Hunsaker50dfe012013-03-04 02:05:20 -0700105define('EXIT_UNKNOWN_FILE', 4); // file not found
106define('EXIT_UNKNOWN_CLASS', 5); // unknown class
107define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
Daniel Hunsaker3b5b7f42013-02-22 19:17:56 -0700108define('EXIT_USER_INPUT', 7); // invalid user input
109define('EXIT_DATABASE', 8); // database error
110define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
111define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
Derek Allard2067d1a2008-11-13 22:59:24 +0000112
113/* End of file constants.php */
Derek Jonesf0b39942010-03-25 10:08:20 -0500114/* Location: ./application/config/constants.php */