Reputation: 3
This is what my directory looks like:
>admin
>scripts
file.php
>config
database.php
I'm trying to use
require_once '../config/database.php';
on the file.php, but it doesn't seem to be able to find said file. Gives me the error
Warning: require_once(../load.php): failed to open stream: No such file or directory in C:/path_to_file.php
Upvotes: 0
Views: 48
Reputation: 67
require_once '../../config/database.php';
Try this. I think you have to go backwards twice :)
Upvotes: 1