Using PHP -Reference

Two ways to use PHP on Glitch for personal reference.

1 Allow PHP in your glitch.json

  "install": "echo 'We Are Ready!'",
  "start": "php -S -t ."

2 php-poc

Use the “SlimFramework” on php-poc:


@MindsGaming, that info is useful and for more people to notice it, I’m moving this to #the-gallery! And also a correction, you need to add that piece of code in the glitch.json not the package.json!

1 Like

I can find this and add it.

glitch.json can be described more simply:

  "start": "php -S"

If you need a directory, use the -t option:

  "start": "php -S -t public/"

I have published this project as a sample:

There may be some more tips: