Generally when we talking about joomla extension or study core module of joomla, we always got to know about few constant used frequently. Let’s go through most of constant which we need to know at time of development or study of joomla.
_JEXEC:
Generally this constant we use to check security, most of every pages of joomla have check this constant value. if it’s false then we give ‘Access Restricted’ message. And it’s set into joomla main landing page /index.php.
JPATH_BASE:
It’s generally same like __DIR__, The path to the installed Joomla! site, or JPATH_ROOT/administrator if executed from the backend. JPATH_BASE is the root path for the current requested application, so if you are in the administrator application JPATH_BASE == JPATH_ADMINISTRATOR and If you are in the site application JPATH_BASE == JPATH_SITE and If you are in the installation application JPATH_BASE == JPATH_INSTALLATION.
Few constant defined into defines.php file which is located into /includes/defines.php. BTW defines.php is include through /index.php
JPATH_ADMINISTRATOR:
The path to the administrator folder.
JPATH_BASE:
The path to the installed Joomla! site, or JPATH_ROOT/administrator if executed from the backend.
JPATH_CACHE:
The path to the cache folder.
JPATH_COMPONENT:
The path to the current component being executed.
JPATH_COMPONENT_ADMINISTRATOR:
The path to the administration folder of the current component being executed.
JPATH_COMPONENT_SITE:
The path to the site folder of the current component being executed.
JPATH_CONFIGURATION:
The path to folder containing the configuration.php file.
JPATH_INSTALLATION:
The path to the installation folder.
JPATH_LIBRARIES:
The path to the libraries folder.
JPATH_PLUGINS:
The path to the plugins folder.
JPATH_ROOT:
The path to the installed Joomla! site.
JPATH_SITE:
The path to the installed Joomla! site.
JPATH_THEMES:
The path to the templates folder.
JPATH_XMLRPC:
The path to the XML-RPC Web service folder.(1.5 only)
JPATH_PLATFORM:
The path of platform or we can say lib.