Constants: Difference between revisions
From Joomla! Documentation
Moved from Framework page and formatted into a table. |
Added JPATH_BASE and note/reference to JURI:base to differentiate between file system paths and URI paths |
||
| Line 5: | Line 5: | ||
|JPATH_ADMINISTRATOR | |JPATH_ADMINISTRATOR | ||
|The path to the administrator folder. | |The path to the administrator folder. | ||
|- | |||
|JPATH_BASE | |||
|The path to the installed Joomla! site. | |||
|- | |- | ||
|JPATH_CACHE | |JPATH_CACHE | ||
| Line 37: | Line 40: | ||
|} | |} | ||
These constants are defined in <code>_path_/includes/defines.php</code> | These constants are defined in <code>_path_/includes/defines.php</code> except JPATH_BASE which is defined in <code>_path_/index.php</code>. | ||
Note: These paths are the absolute paths of these locations within the file system, NOT the path you'd use in a URL. | |||
For URL paths, try using [[JURI/base|JURI::base]]. | |||
<noinclude>[[Category:Development]]</noinclude> | <noinclude>[[Category:Development]]</noinclude> | ||
Revision as of 16:50, 14 October 2009
These constants are defined for use in Joomla and extensions:-
| JPATH_ADMINISTRATOR | The path to the administrator folder. |
| JPATH_BASE | The path to the installed Joomla! site. |
| JPATH_CACHE | The path to the cache folder. |
| JPATH_COMPONENT | The path to 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. |
These constants are defined in _path_/includes/defines.php except JPATH_BASE which is defined in _path_/index.php.
Note: These paths are the absolute paths of these locations within the file system, NOT the path you'd use in a URL.
For URL paths, try using JURI::base.