php - Failed to open stream: No such file or directory while path seems fine

My project architecture
./src/index.php
./src/Views/App/index.php
./src/Views/header.php
./src/index.php
is routing and sending the user to./src/Views/App/index.php
$request = $_SERVER['REQUEST_URI'];
switch ($request) {
case '/' :
case '':
require __DIR__ . '/src/Views/App/index.php';
break;
Then the file simply tries to load the header
<?php
require_once("./../header.php");
?>
Even if the relative filepath to header.php looks fine, I'm getting the following error :
Warning: require_once(./../header.php): failed to open stream: No such file or directory in /home/rock/Desktop/projets/src/Views/App/index.php on line 3
Fatal error: require_once(): Failed opening required './../header.php' (include_path='.:/usr/share/php') in /home/rock/Bureau/projets/src/Views/App/index.php on line 3
What am I missing there ?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: invalid argument supplied for foreach() laravel
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.