I have a code in PHP, which includes some files using absolute files like:
require_once($_SERVER['DOCUMENT_ROOT'] . "/frontend/src" . "/requests/Requests.inc");
Locally it launches successfully. But when I try to launch it in my NGINX docker container it writes that file isn't found.
NGINX root path: /var/www/html/
Index.php is in: /frontend/src
I tried to determine for my paths, NGINX root as zero point, and changed it too
require_once("/frontend/src" . "/requests/Requests.inc");
Still it doesn't work. Since that moment I don't understand, how does absolute path in NGINX + PHP work?