[TOC]
The ExpressionEngine core defines a variety of constants to ensure consistency in several aspects. Please be aware that some of the constants may not be defined, or have different meaning, in the context of the ExpressionEngine installer.
SELF
- Name of the admin file- Example:
admin.php
- Example:
FCPATH
- Path to the admin file- Example:
/var/www/html/website.com/public/
- Example:
SYSDIR
- Name of the system directory- Example:
system
- Example:
SYSPATH
- Path of the system directory- Example:
/var/www/html/website.com/system/
- Example:
APPPATH
andBASEPATH
- Path to thesystem/ee/legacy
directory- Example:
/var/www/html/website.com/system/ee/legacy/
- Example:
PATH_ADDONS
- Path to the first-party add-ons directory- Example:
/var/www/html/website.com/system/ee/ExpressionEngine/Addons/
- Example:
PATH_THEMES
- Path to the themes directory- Example:
/var/www/html/website.com/public/themes/ee/
- Example:
PATH_MBR_THEMES
- Path to the member themes directory- Example:
/var/www/html/website.com/public/themes/ee/member/
- Example:
PATH_CP_GBL_IMG
- Path to the global image directory- Example:
https://website.com/themes/ee/asset/img/
- Example:
PATH_JAVASCRIPT
- Path to the javascript directory- Example:
/var/www/html/website.com/public/themes/ee/asset/javascript/compressed/
- Example:
PATH_JQUERY
- Path to the jQuery directory- Example:
/var/www/html/website.com/public/themes/ee/asset/javascript/compressed/jquery/
- Example:
PATH_THIRD
- Path to third-party add-ons directory- Example:
/var/www/html/website.com/system/user/addons/
- Example:
PATH_THIRD_THEMES
- Path to the third-party themes directory- Example:
/var/www/html/website.com/public/themes/user/
- Example:
APP_NAME
- Application NameAPP_VER
- Version numberAPP_BUILD
- Build number
BASE
- Base URL to the control panelAMP
-&
QUERY_MARKER
- Question mark if forcing query strings, blank otherwiseURL_THEMES
- URL to the theme folderURL_THIRD_THEMES
- URL to the third-party theme folder
NBS
-
BR
-<br />
NL
-\\n
REQ
- One of:'PAGE'
,'CP'
,'ACTION'
AJAX_REQUEST
- (bool
)TRUE
if request came from one of jQuery's ajax functions
These constants are located in expressionengine/config/constants.php
, and are user configurable to their hosts' requirements. You should always use these constants for creating and writing to files so that you do not have to worry about which permissions to use. Listed alongside each is their default equivalency.
FILE_READ_MODE
- Equivalent to0644
FILE_WRITE_MODE
- Equivalent to0666
DIR_READ_MODE
- Equivalent to0755
DIR_WRITE_MODE
- Equivalent to0777
FOPEN_READ
- Equivalent torb
FOPEN_READ_WRITE
- Equivalent tor+b
FOPEN_WRITE_CREATE_DESTRUCTIVE
- Equivalent towb
FOPEN_READ_WRITE_CREATE_DESTRUCTIVE
- Equivalent tow+b
FOPEN_WRITE_CREATE
- Equivalent toab
FOPEN_READ_WRITE_CREATE
- Equivalent toa+b
FOPEN_WRITE_CREATE_STRICT
- Equivalent toxb
FOPEN_READ_WRITE_CREATE_STRICT
- Equivalent tox+b
LD
- Left template tag delimiter (usually{
)RD
- Right template tag delimiter (usually}
)DEBUG
- (bool
)TRUE
if$debug
is set to 1CSRF_TOKEN
- CSRF token, blank if csrf protection is disabled.XID_SECURE_HASH
- previous name ofCSRF_TOKEN
MASKED_CP
- (bool
)TRUE
if the CP is masked for this requestEXT
- File extension (.php
)UTF8_ENABLED
- Server has proper UTF-8 supportMB_ENABLED
- Server has multibyte function supportPASSWORD_MAX_LENGTH
- Maximum number of characters for a password.