Greetings.
I know this is a path problem, but I don't have a clue on how to solve it, so please help me.
I have the following folder structure:
root
|-------include
|-----------class
|-----------conf
So, with the goal to make a very portable code I've created a file called "setup.conf.php" that defines some constants to work (like path, url, database params, and so on).
So I have this file in include->conf.
I have my classes on include->class and I want them to require_once the setup.conf.php so they now the constants.
My problem is that when I insert this code:
require_once('../conf/setup.conf.php');
I get the following error:
Warning: main(): Unable to access ../conf/setup.conf.php in /home/httpd/html/galvao.eti.br/html/auth/include/class/gerenciaLogin.class.php on line 14
Warning: main(../conf/setup.conf.php): failed to open stream: No such file or directory in /home/httpd/html/galvao.eti.br/html/auth/include/class/gerenciaLogin.class.php on line 14
Fatal error: main(): Failed opening required '../conf/setup.conf.php' (include_path='.:/usr/local/lib/php') in /home/httpd/html/galvao.eti.br/html/auth/include/class/gerenciaLogin.class.php on line 14
And if I put the setup.conf.php in the class folder and call it by:
require_once('setup.conf.php');
it works fine...
Can someone please help me?
Thanks in advance,