yandeu / five-server-vscode

⚡ VSCode Extension for Five Server.
https://marketplace.visualstudio.com/items?itemName=yandeu.five-server
Other
120 stars 9 forks source link

Can't include file outside of a subfolder #36

Open Lunyyx opened 1 year ago

Lunyyx commented 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

kyubson commented 1 year ago

Hi @Lunyyx

Try with __DIR__, example: <? php include __DIR__ . "/../shared/navbar.html"; ?>