0
In PHP applications, when I use absolute path, everything works perfectly, but when I use relative path, it doesn’t work.
An example: in my application I have to use this:
file_exists("/var/www/html/meus_projetos/dgnetwork/public_html/model/persistence/dao/dao_config/{$name}.ini")
On my local server apache2, I have a virtual hosts where I set the attribute DocumentRoot /var/www/html/meus_projetos/dgnetwork/public_html
With this I imagined that I could use the absolute path from public_html ie:
file_exists("model/persistence/dao/dao_config/{$name}.ini")
But it didn’t work.
I wonder if someone could help me organize it better?
I would recommend that you create a fixed location configuration file, where you would place all paths to directories and subdirectories of the site/project including the root, and initialize these settings at once..
– Edilson