How do I write PHP scripts?

?2018-12-21T15:37:24Z

Learn PHP then use your favorite text editor!

Gordon B2018-12-21T00:56:00Z

php is basically a text file, generally its mixed in with html.

Laurence I2018-12-20T12:17:52Z

go practice w3schools.

Anonymous2018-12-20T05:52:54Z

PHP scripts are embedded within HTML documents in PHP tags.

You can just use something like Notepad++ to write PHP scripts.

php -S localhost:8000

That will create a PHP server on your local machine. You can navigate to it in a web browser by typing "localhost:8000" in the URL bar.

The files that are on the PHP server will be the same files that exist in the current directory of the CLI when you started the PHP server. Such as if you named the file "demo.php" and you stated the PHP server in the same directory as the file, then it will be located at "localhost:8000/demo.php".