Home Tutorial Php Examples PHP Get Base Directory

 
 

PHP Get Base Directory
Posted on: October 9, 2009 at 12:00 AM
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/

Related Tags for PHP Get Base Directory:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.