|
|
| (One intermediate revision by one other user not shown) |
| Line 1: |
Line 1: |
| == What is the Absolute Path? ==
| | #REDIRECT [[Constants]] |
| The absolute path is the directory location on a server's drive where the Joomla! Website is located.
| |
| | |
| == Joomla! 1.0 {{JVer|1.0}} ==
| |
| In Joomla! v.1.0.x the configuration.php file would contain something like the following, however, it can vary depending on your server.
| |
| | |
| <source lang="php">$mosConfig_absolute_path = '/home/joomla/public_html';</source>
| |
| | |
| === Usage ===
| |
| To find your absolute path, copy the following code into a text editor such as Notepad++ or TextEdit. Save the file as a ''.php'' naming it whatever you want. (For example, ''myabsolutepath.php''.)
| |
| | |
| Using your FTP client software, transfer the file you have just created to the root folder of your Joomla Website. Open a Web browser and type in ''www.yourdomain.com/myabsolutepath.php''.
| |
| | |
| <source lang="php">
| |
| <?php
| |
| $path = getcwd();
| |
| echo "Your Absoluthe Path is: ";
| |
| echo $path;
| |
| ?>
| |
| </source>
| |
| | |
| '''''IMPORTANT: For security reasons, delete this file as soon as you have ascertained the information you require.'''''
| |
| | |
| == Joomla! 1.5 {{JVer|1.5}} ==
| |
| In Joomla! v.1.5.x the absolute path is set in the index.php (<small>line 17</small>) file in the base directory to the constant [[JPATH_BASE]].
| |
| | |
| <source lang="php">define('JPATH_BASE', dirname(__FILE__) );</source>
| |
| | |
| === Usage ===
| |
| Use the constant [[JPATH_BASE]]. This constant returns the absolute path to your Joomla! installation directory.
| |
| | |
| <source lang="php">
| |
| <?php
| |
| echo JPATH_BASE;
| |
| ?>
| |
| </source>
| |
| | |
| == See Also ==
| |
| [https://forum.joomla.org/viewtopic.php?t=1035 Absolute Path for Joomla! 1.0.x]
| |
| | |
| [[Category:Tips and tricks]]
| |
| [[Category:Tips and tricks 1.0]]
| |
| [[Category:Tips and tricks 1.5]]
| |