|
|
Did you notice that the page is called index.phtml and not index.html? that is because the page you are seeing is a generated by a PHP script. What is PHP you say? well it is a server side HTML embedded scripting language. Now the next question; what on earth is a server side HTML embedded scripting language?. It is a kind programming language specialy designed for the web. That's why it is called Personal Homepage Parser. The idea is that instead of writing loads of code with C or perl, you embedd a snippet of PHP code to create dynamic content. Suppose you wanted to write hello world on the browser screen with a program or script. (You could do it easily with plain old HTML but bear with me for now.) You could do it with PHP like this.
You don't need to place this hello world file on a special directory, or play around with the permission like you need to with old fashioned CGI. And the script doesn't run on your machine like client side Javascripts do. Instead it runs on the server. You can make the process completely invisible to the visitor. Which is a big advantage over Javascripts where visitors can see the entire script. I hope by now you are leaning forward with eagerness to get started on PHP. The first thing to do is find out if your server has PHP. (If you don't have a web site please read the page on website hosting services). Just cut and paste the code given above into your text editor, then save it as hello.phtml and upload it onto your server. If it works you are in luck. If it doesn't work try renaming the file to hello.php or hello.php3 . If it still does not work you need to change hosts! By the end of this week (Sat 08th April) I hope to have some more pages on php up on this site. For the moment please bookmark this page and move onto the PHP Links page to find some pretty good resources on php |
raditha@webquarry.com March 14, 2000.