Wednesday 08 February 2012

Finding an Absolute Path

If you have ever installed a script on your website, then you probably already know your absolute path. But there are times when you either don’t know the absolute path of a directory, or you are troubleshooting a new system and need the absolute path quickly.

Luckily there is a very simple way to get this information using a small bit of PHP. Simply place the following line of code into a blank file and call it path.php:

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

Then place the file on your server in the directory you are working on and visit in your web browser (i.e.: http://www.yourdomain.com/directory/path.php) to display the absolute path of the directory.

About the author

Founder of Eos Designs and co-founder of iPrintEasy and a number of other web businesses - an entrepreneur with over 10 years of experience in Internet Marketing - Zach understands what it takes to be successful online and specializes in the development of advertising campaigns and marketing plans for start-ups.

Powered by WordPress | Privacy Policy | Web Design Miami