I'm a newbie in PHP. My project is stored in the folder called 'Remember'. I want to include database.php into the home.php
- Remember/app/database/database.php
- Remember/app/logged/home.php
In the home.php file I have this code
require_once('../database/database.php');
Warning: require_once(../database/database.php): Failed to open stream: No such file or directory in E:\allProject\CS50\final_project\Remember\app\logged\home.php on line 12
But if I'm using absolute path, it will work
require_once("E:/allProject/CS50/final_project/Remember/app/database/database.php");
I wonder why this happen because before this code, there are no problems about the file path