Constants

Constants in TYPO3 define paths and database information. These values are global and cannot be changed. Constants are defined at various points during the bootstrap sequence.

To make the information below a bit more compact, namespaces were left out. Here are the fully qualified class names referred to below:

Check \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::defineBaseConstants() method for more constants.

Paths

TYPO3_mainDir

Deprecated since version 12.0

This is the directory of the backend administration for the sites of this TYPO3 installation. Hardcoded to typo3/. Must be a subdirectory to the website.

Defined in:
SystemEnvironmentBuilder::defineBaseConstants()
Available in Frontend:
Yes

File types

Different types of file constants are defined in \TYPO3\CMS\Core\Resource\AbstractFile . These constants are available for different groups of files as documented in https://www.iana.org/assignments/media-types/media-types.xhtml

These file types are assigned to all FAL resources. They can, for example, be used in Fluid to decide how to render different types of files.

Constant Value Description
AbstractFile::FILETYPE_UNKNOWN 0 Unknown
AbstractFile::FILETYPE_TEXT 1 Any kind of text
AbstractFile::FILETYPE_IMAGE 2 Any kind of image
AbstractFile::FILETYPE_AUDIO 3 Any kind of audio
AbstractFile::FILETYPE_VIDEO 4 Any kind of video
AbstractFile::FILETYPE_APPLICATION 5 Any kind of application

HTTP status codes

The different status codes available are defined in EXT:core/Classes/Utility/HttpUtility.php (GitHub). These constants are defined as documented in https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml