PHP Get Base Directory

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

 
 

Share on Google+Share on Google+

PHP Get Base Directory

Ads

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