Open Lunyyx opened 1 year ago
Hello My structure looks like this:
/tutorials/windows.php /includes/navbar.php /index.php
When I'm on the windows.php file, I try to include the navbar.php with:
include('../includes/navbar/navbar.php');
But, it gives me an error because it can't find the file
I tried with an apache server, and it's working fine
Hi @Lunyyx
Try with __DIR__, example: <? php include __DIR__ . "/../shared/navbar.html"; ?>
__DIR__
<? php include __DIR__ . "/../shared/navbar.html"; ?>
Hello My structure looks like this:
When I'm on the windows.php file, I try to include the navbar.php with:
But, it gives me an error because it can't find the file
I tried with an apache server, and it's working fine