When I press the Run button, a file opens in the Webview index.php .

Hi. I just started using Replit yesterday, so I don’t understand how it works.

When I press the Run button, a file opens in the Webview index.php .

What should I do to open any other php file?

Hi @dns199 , welcome to the forums!
Open the website in a New tab and add /file.php where file.php is the name of your file.
Hope this helps!


It didn’t help. Any php file whose name differs from index.php do not output anything to the Webview.

And if you delete the file index.php then the Webview shows an error:

Screenshot 2024-03-27 at 15-38-54 title

Try it in a new tab.

I believe the default is index.php.


How do I change the default value?

Hey @dns199!

To change the default value, you will have to go to the .replit file and change it.
You can access the .replit file, by first clicking on the three dots () next to where it says Files >, then click Show Hidden Files, finally open the .replit file.

Helpful Images

Then in the .replit file scroll down to where it says run = and entrypoint =. Wherever it says the default file name replace it with the file you want to run. I hope this helps!

1 Like

In line 3, I replaced it with array.php . It didn’t help.

@dns199 try changing line 1 of the .replit file to this →
run = “php array.php -s -t .”, and line 9 to this → run = [“php”, “array.php”, “-s”, “”, “-t”, “.”]. I hope this helps!

Now the Webview shows the message:
Screenshot 2024-03-27 at 20-04-41 title

You can change it by editing the URL bar:


It’s Not Found as you deleted index.php. Of you put /array.php at the back, it should work.