Ask coding questions

← Back to all posts
Php with html?
JacksonAiken3 (16)

How can i add a file of PHP with the HTML, CSS, and JS. Like if you press the red plus and chose HTML, CSS, JS file. It creates those three. however i want to learn PHP so how can i implement that into those files. I dont like programming in <script> like tags in html. Thanks

timmy_i_chen (1180)

We made some updates to PHP (well, we made two new "languages"): - New and improved PHP language for command line interface shenanigans. Supports multiple files. - PHP Web servers! Just like other hosted repls, this allows you to write websites using PHP.


cc @Tibtub

Tibtub (3) I will stop using you if you dont support php with HTML ) ;

Vandesm14 (2737)

PHP is not currently supported for html repls. If you need server side html pages, use an Express.js repl. Just fork my template to get started:

If you need any help learning Nodejs, feel free to ask me.

hillsam001 (26)

@Vandesm14 Are there plans to make it supported in the future? It would be really useful...

Vandesm14 (2737)

@hillsam001 I don't think there are any plans to make it supported. About 1.5 years back I had posted the same question. They said it was on the back burner, and it still seems that way now.

TiffanyLiu1 (0)

@Vandesm14 Do you have a sample (HTML, CSS, JS) with a working form submission?

Vandesm14 (2737)

@TiffanyLiu1 Refer to this:
It is a template created by Tim Chen. It is a simple system that takes the form request, sends it to the Nodejs server, processes it, and sends it back to the client. If you need more help, feel free ask me: [email protected]

TiffanyLiu1 (0)

@Vandesm14 Thanks - like the title suggest the template is 'broken'... is there a working version?