bugzy Posted March 28, 2012 Share Posted March 28, 2012 I have this connection file "database_connection.php" under folder C:\wamp\www\php\database\database_connection.php and I'm calling it using required_once on file "add_database.php" under folder C:\wamp\www\php\database\ManipulatingDatabase\add_database.php Here's the code on <?php include_once('../database/database_connection.php'); ?> and I'm having this error Warning: include_once(../database/database_connection.php) [function.include-once]: failed to open stream: No such file or directory in C:\wamp\www\php\database\ManipulatingDatabase\add_database.php on line 3 Warning: include_once() [function.include]: Failed opening './database/database_connection.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\php\database\ManipulatingDatabase\add_database.php on line 3 I have tried everything else. Maybe there's something wrong on my .ini file?Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/259876-cant-find-the-correct-path/ Share on other sites More sharing options...
scootstah Posted March 28, 2012 Share Posted March 28, 2012 You only need to go back one directory. include_once('../database_connection.php'); Quote Link to comment https://forums.phpfreaks.com/topic/259876-cant-find-the-correct-path/#findComment-1331917 Share on other sites More sharing options...
bugzy Posted March 28, 2012 Author Share Posted March 28, 2012 Solved. Sorry for my ignorance as I'm very new in PHP Thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/259876-cant-find-the-correct-path/#findComment-1331922 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.