Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

conor0460's avatar

Commands like fetch don't work

I'm trying to display photos from a folder in the same directory and everything works fine when I use php to access the folder. But when using fetch or xmlrequest it gives me an error error 403 and says I can't access folder. I've already changed the permissions on everything for full access https://vidmate.bid/ . I'm hosting the website on domain.com if tht helps. I'm also not sure if this is the right sub to ask if not pls lmk if u have other places I can ask

0 likes
2 replies
vincent15000's avatar

For security reasons, you cannot access any local folder or file with Javascript.

Snapey's avatar

The images must be in the public folder or a folder which is symlinked into the public folder

2 likes

Please or to participate in this conversation.