Skip to content

User Tutorials icon

How to Determine Absolute Path

This tutorial shows you how to determine Absolute Path for your Mambo web site.

When uploading from a local testing server to a web server the absolute path also needs to be updated.
The absolute path is the directory where Mambo is located on the server hard drive.

This small PHP script will report the actual absolute path.
Make a new PHP file and call it something like serverpath.php
Right at the top, with no spaces before it, add this PHP Code:

<?php echo $_SERVER['DOCUMENT_ROOT']; ?>

Place (upload) this script in the directory where you want to find the absolute path.
Point a browser to this script and the path will appear in the browser.

On a Linux server, that will give you something like this example:
/var/www/example.com/httpdocs

In the Mambo configuration.php file, the above example would look like this:

$mosConfig_absolute_path = '/var/www/example.com/httpdocs';
Bookmark This:
  • bodytext
  • Technorati
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon
  • Reddit

Whether I am developing Mambo or working on tutorials I am fuelled by coffee. Caffeine keeps me going so if you like the work I am doing please click on the cup to buy me a coffee today. Just $10 covers the cost of getting my caramel macchiato ;)

If you enjoyed this article make sure you subscribe to my RSS feed!

Leave a Reply

This is a gravatar-friendly site, enter your email address to use your gravatar.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.