My file structure:
- sys : a folder containing 3 sub folders: inc, class, and config. The inc folder has a
phpfileinit.php. index.phpin the root folder.
My config folder has a file with the DB credentials which is include_once ('..\config\db_credentials.php'); in init.php. The init file is working fine with included file.
I have also included include_once ('sys\inc\init.inc.php'); in index.php but if I run the index file it says:
Warning: include_once(..\config\db_credentials.php): failed to open stream: No such file or directory in C:\wamp\www\example\sys\inc\init.inc.php on line 3
and
Warning: include_once(): Failed opening '..\config\db_credentials.php' for inclusion (include_path='.;C:\php\pear') in C:\wamp\www\example\sys\inc\init.inc.php on line 3
What am I doing wrong and how can I make this work?