Web
Tutorials |
|
|||
|
|
||||
|
What the heck is PHP?Technically, PHP is a server-side, cross-platform, HTML embedded scripting language, also called a hypertext preprocessor. If that's a little confuisng, don't worry- we'll make it a little easier to understand. PHP is:PHP origonated as a Perl hack, and was written by Rasmus Lerdorf in 1994. It soon evolved into what we know today as PHP. The letters "PHP" stood for Lerdorf's Personal Home Page utility. The syntax is mainly patterned after C, with some elements borrowed from Perl, C++ and Java. But don't that scare you, it is only patterned after the above, and not nearly as hard to learn. If you are a programmer, you will find PHP to be very easy to learn, and if you are not a programmer, you can still easily learn enough to transform your site from static plain-Jane HTML to a dynamic and interactive format. How PHP Works:The easiest way to understand how PHP works is with an example: <?php print "Hello, User!"; ?> To break it down, the characters '<?php' tell the browser to expect a PHP script. The middle part is self explanatory, and the final tag '?>' tells the browser "That's the end of the script". The above code will be processed by the server and then sent to the user's browser as plain HTML, with this result: Hello, User!So why bother, you may say? Can't HTML do the same thing? Yes, of course it can, and the example above is only used to explain how it works in a very general way. Instead of printing text, a variable could be used to greet a member of a forum by their name, or to pass variables from one page to another, or to tell the webmaster what page a user was viewing when they used an email link. There are also far more useful reasons to use PHP, to name just a few here: PHP is arguably the hottest new thing on the web now, with over 3,000,000 websites already using it. It affords the advantages of ASP, server-side JavaScript, or CGI scripting, and is faster than CGI and much easier to learn than any of them. Sound good? Then keep an eye out for some mini tutorials on basic PHP which I intend to begin putting up soon, as I have the time. And there will also be a few PHP scripts that you can use, added to the Free Stuff section periodically. |
HOSTING:
|