Answer the question
In order to leave comments, you need to log in
Absolute site paths in realpath?
There is a PHP page, at the beginning of which a config with a similar construction is connected:
define('PROJECT_DIR', realpath(dirname(__FILE__).'/../').'/');
Answer the question
In order to leave comments, you need to log in
Elderberry in the garden, and uncle in Kyiv.
We connect the config in a file that is not found.
404 means the address was not found. If the web server didn't find the PHP file, that file didn't execute. If the PHP file did not start, then the matter did not come to a "similar design" at all.
To avoid 404, you must specify the correct path to the file, without any realpath, configs and other things.
realpath has nothing to do with 404 at all. Read until enlightenment: phpfaq.ru/newbie/paths
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question