Read-Only Filesystem Error in PHP
JohnjiRomanji

I’m getting the following error in when running some web server php:

The lines I have narrowed it down to are:

Basically it needs to write to a html file to make a redirect for a specific slug on a url shortener.
This is my first php project.

From what I understand it is because the computer is protecting its files, but how can I fix this on replit? Is there a shell command or something?

Any help would be appreciated, thanks.

You are viewing a single comment. View All
Coder100

The actual repl is inside a folder named your repl name.
Specifically:
/home/runner/<replname>/index.html

so don't forget to add __dirname or whatever the equivalent is in php.

JohnjiRomanji

@Coder100 Thanks! This worked!

Coder100