five-server-vscode
five-server-vscode copied to clipboard
Can't include file outside of a subfolder
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"; ?>