Retired Documentation
You are using the documentation for version 2.11.9. Go here for the latest version or check here for your available upgrades to the latest version.
Constants Reference¶
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.
Path Constants¶
PATH_THIRD
- Path to thesystem/expressionengine/third_party
folder.PATH_THEMES
- Path to the/themes
folder.APPPATH
- Path to the/expressionengine
folder.BASEPATH
- Path to thesystem
folder.PATH_MOD
- Path to the first party modules folder.PATH_PI
- Path to the first party plugins folder.PATH_EXT
- Path to the first party extensions folder.PATH_ACC
- Path to the first party accessories folder.PATH_FT
- Path to the first party fieldtypes folder.PATH_THIRD_THEMES
- Path to the third party themes folder.PATH_MBR_THEMES
- Path to the member themes folder.PATH_CP_GBL_IMG
- Path to the global image folder.PATH_JAVASCRIPT
- Path to the javascript folder.PATH_JQUERY
- Path to the jQuery folder.SELF
- Name of the bootstrap fileFCPATH
- Path to the bootstrap fileSYSDIR
- Name of the system folder
Version Constants¶
APP_NAME
- Application NameAPP_VER
- Version numberAPP_BUILD
- Build numberCI_VERSION
- CodeIgniter version
URL Constants¶
BASE
- Base URL to the control panelAMP
-&
QUERY_MARKER
- Question mark if forcing query strings, blank otherwiseURL_THIRD_THEMES
- URL to the third party theme folder
HTML Constants¶
NBS
-
BR
-<br />
NL
-\\n
Request Constants¶
REQ
- One of:'PAGE'
,'CP'
,'ACT'
AJAX_REQUEST
- (bool
)TRUE
if request came from one of jQuery’s ajax functions
Filesystem Mode Constants¶
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
Others¶
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.