This script output the path to your base directory (aka “Document Root”), this code also useful to debug PATH in PHP errors
<?php print ($_SERVER['DOCUMENT_ROOT']); ?>
This script output the path to your base directory with current working dir
<?php echo getcwd(); ?>
Leave a Reply