In PHP applications, when I use absolute path, everything works perfectly, but when I use relative path, it does not 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 DocumentRoot /var/www/html/meus_projetos/dgnetwork/public_html
attribute
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 did not work.
Can anyone help me organize this better?