Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
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\
method for more constants.
Table of contents
Paths
TYPO3_mainDir
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:
System
Environment Builder:: define Base Constants () - Available in Frontend:
- Yes
File types
Different types of file constants are defined in \TYPO3\
.
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 |
---|---|---|
Abstract | 0 | Unknown |
Abstract | 1 | Any kind of text |
Abstract | 2 | Any kind of image |
Abstract | 3 | Any kind of audio |
Abstract | 4 | Any kind of video |
Abstract | 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