Q:

Write a PHP script to get the document root directory under which the current script is executing, as defined in the server's configuration file

0

Write a PHP script to get the document root directory under which the current script is executing, as defined in the server's configuration file.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
// getenv() gets the value of an environment variable
$rd = getenv('DOCUMENT_ROOT');
echo $rd."\n";
?>

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now