PHP question help

I’ve just started learning PHP because it is a lot better than node.js in my opinion and I don’t know how to do this:
app.get("/", (request, response) => {
response.sendFile(__dirname + “/views/index.html”);
in php

@RiversideRocks, please come to topic number 32135. A person is here to see you



Hi @David34!
Basically, PHP doesn’t have a server file. Instead it’s embedded into HTML similarly to EJS. So all you need to do is rename index.html to index.php assuming you have remixed lamp-poc ( which has all the necessary server things to make PHP work on Glitch
Hope this helps :slight_smile:

1 Like

Hello! PHP doesn’t have native routing, however you can always use something like Laravel (I have not tried it on glitch).