Ask coding questions

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

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

Commentshotnewtop
timmy_i_chen (962)

We made some updates to PHP (well, we made two new "languages"):

https://repl.it/languages/php_cli - New and improved PHP language for command line interface shenanigans. Supports multiple files.
https://repl.it/languages/php7 - PHP Web servers! Just like other hosted repls, this allows you to write websites using PHP.

Enjoy!

cc @Tibtub

Tibtub (2)

repl.it I will stop using you if you dont support php with HTML ) ;

Vandesm14 (692)

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: https://repl.it/@Vandesm14/Express-Template

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

hillsam001 (21)

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

Vandesm14 (692)

@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 repl.it (HTML, CSS, JS) with a working form submission?

Vandesm14 (692)

@TiffanyLiu1 Refer to this: https://repl.it/@Vandesm14/LameBrokenDemos
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?