Actually I tried to change document root in php?
$_SERVER['DOCUMENT_ROOT'] = "C:/Users/admin/Desktop/Infogreen/";
The above code is working. But when i am trying to copy from variable is not working. I can't find the mistake.
$_SERVER['DOCUMENT_ROOT'] = $_GET[path];
Please help to solve this problem.
The document root is not set in PHP, it's set by the Webserver. If you use Apache, you can find the DocumentRoot
directive in the apache config.