There is a file in the root of the site, for example /var/www/html/mysite/html/conf.php , but I don’t know the full path to it beforehand, only its name is known, how to include this conf.php file from the file that is executed in /html/img/conf/res.php
|
1 answer
Try
echo $_SERVER['DOCUMENT_ROOT']; - This function returns the path only to / var / www / html, and html / mysite / ... does not show - diego_costa
- @diego_costa, proof , it says "which is specified in the server configuration file". It's great that you built such a tricky directory tree and put some meaning into it. But how does the program find out about this?) Reads your thoughts? - Alexander Belinsky
- if I knew in advance that I would have to do it) it turns out that you need to edit the server config file to get access to the root via document_root? - diego_costa
|
/html/conf.php? Please clarify the text of the question by clicking edit - aleksandr barakin