Share on Google+Share on Google+

PHP Get Base Directory

Advertisement
PHP Get Base Directory tutorial gives you an example to get the base directory

PHP Get Base Directory

 To know the base directory we may use $_SERVER['DOCUMENT_ROOT'];

Code:

<?php

//to know your base directory

print ($_SERVER['DOCUMENT_ROOT']);

?>

 

Output:

C:/wamp/www/

Advertisements

Posted on: October 9, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.