= PHP and HTML
* October 18
Don't forget, you can make a PHP web server and look at it using your web browser if you use the following command:
php -S 127.0.0.1:5000
You can change 5000 to any number you like, but usually between 5000 and 10,000.
== Example Webpage
Let's make a PHP file that creates a wepbage, by echo-ing some HTML.
He goes to a supermarket. He gets some crisps.
He goes to a small shop. He gets a book.
"; ?> == Story Webpage You can use anything in PHP when you are running in a web-page, but you should output HTML for the browser.One day, {$name1} was bitten by a "; echo "{$animal}. "; echo "The {$animal} was magic, and {$name1} became "; echo "{$animal}{$name1}.
"; echo "The next day, {$animal}{$name1} saw {$name2}. "; echo "{$name2} said, why are you a {$animal}? "; echo "{$name1} said, \"I don't know.\" "; echo "The end!
"; ?> == Homework Make your own funny story.