Home php find out the absolute path to PHP file

find out the absolute path to PHP file




There is a file at the root of the site, for example /var/www/html/mysite/html/conf.php , but the full way to it is not known to him in advance, only his name is known how to make include this file conf.php from the file that is performed in /html/img/conf/res.php

Answer 1, Authority 100%


echo $ _server ['document_root'];

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions