I am working on a PHP project,i am getting an error in require_once(or even in require)
Warning: require_once(C:/wamp/www/MyFiles/MyProject/includes/db_config.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\MyFiles\MyProject\includes\autoloads.php on line 9
Fatal error: require_once() [function.require]: Failed opening required 'C:/wamp/www/MyFiles/MyProject/includes/db_config.php' (include_path='.;C:\php5\pear') in C:\wamp\www\MyFiles\MyProject\includes\autoloads.php on line 9
this is how i am including the file
$root = $_SERVER['DOCUMENT_ROOT'];
//config..
require_once($root . '/MyFiles/MyProject/includes/db_config.php');
i have tried using
echo $root . '/MyFiles/MyProject/includes/db_config.php';
It is printing URL properly
ie C:\wamp\www\MyFiles\MyProject\includes\db_config.php
I am using WAMP server 5 autload.php and db_config.php are in same folder