Advertising


Navigation
External Links
Banner

Intro/Setting up PHP

Maintainer: The PHP Group
Latest release: 5.1.6 / August 24, 2006
4.4.4 / August 17, 2006
OS: Cross-platform
Use: Scripting language
License: PHP License 3.01
Website: http://www.php.net/

Courtesy Wikipedia

So, let's get down and dirty. Well, you know what I mean. So you've come to learn PHP. Well, grasshopper, it begins now with a quick background of what is PHP. PHP stands for PHP:  Hypertext Processor. Yeah, I know, the definition uses the term and it's circuitous.

Hello World! In a few different ways. It actually used to stand for "Personal Home Page Tools." That name no longer holds meaning, PHP is hardly a tool for personal home pages. It's now a full fledged web programming langauge with limitless potential. PHP is a scripting language that acts as both the glue and the gears that hold a website together and also make it tick. You should quickly distinguish the difference between HTML and PHP. The difference is pretty simple to grasp. HTML just generates the "look" of the site; what goes where, what color the font is, what size the font is, what colors the borders are. Can you make full fledged sites with just HTML? Sure but they're very basic and not very interesting and certainly isn't what the public demands these days. So what can PHP do for a site? Well, unlike those static sites using just HTML a site with PHP has the ability to be dynamic, this means the content can change on demand, of course, you have to code it to actually do that. In the next few sections the difference between a pure HTML site and one laced with PHP goodness will be apparant as well as the advantages.

Hopefully you know what a web server is, but if not, fear not, it's a simple concept. When you go to www.google.com your computer contacts the google web server which fetches the google page and sends it back down the wire to your computer. Anyways, you will need a web server that supports PHP. Almost all paid hosting will offer PHP support but if not you can always run a web server on your own computer! Download WAMP. This is a very nice bundle it includes all the neccesities you will need for the rest of these tutorials and it's free. Wamp will automatically download, install and configure Apache (The webserver program), PHP, and MySQL (database).

If you decided to install wamp on your own computer go ahead and point your web browser to http://127.0.0.1/ You should see a little test page. This means everything is fine. Congrats! You've transformed your computer into a webserver. Everything is set up but if this is your first tim setting up a webserver I'll give you a few quick pointers. Your web root is located in C:/wamp/www/ (oh, I know this is windows native, I just assumed that if you're using linux you'd be past this part already), this is the directory where all your files served on your webserver are sitting at. This means if you made a file called blah.html and put it in the web root you'd simply point your web browser to http://127.0.0.1/blah.html and tada!

Ready to greet the world ? Jump to the beginner guide.