In this short article, I will be introducing you to PHP. There will be no actual code, just a bit of background knowledge. This article is going to be one of a series of PHP articles/tutorials introducing you to PHP.
What is PHP?
Straight from the PHP.net website: “PHP is a server-side HTML embedded scripting language. It provides web developers with a full suite of tools for building dynamic websites.”
How it started
PHP started in 1994 when a man named Rasmus Lerdorf created a few quick hacks in Perl. PHP quickly removed itself from Perl and became C code that was embedded in the webserver. At the time, it was not called PHP either, as it was not a language. It was originally created so that Rasmus could count how many people visited his resume page. It advanced to be a collection of “tools” that webmasters could add to their site to provide simple things such as hit counters. Over the next few years, it was improved and evolved into being known as “PHP/FI” (basically mimicking the TCP/IP protocol). As the PHP user-base grew, so did the demand for more tools. At the time, only a simple parser was being used. This was until the guys from Zend came along (you may have heard of them) and they improved/rewrote the PHP parser which provoked the release of PHP 3.0. Another rethink and a lot more developers later, PHP4 was released, and subsequently PHP5. PHP has now evolved into being the most widely used scripting language.
Running PHP scripts
PHP can be ran through many different methods, but the mod_php apache module is the most common way of running PHP scripts. For this, you need a web server set up with PHP and MySQL (we will be going on to this later). I won’t go into detail about installing these on your own PC as there are many other tutorials out there, just have a Google.
Sometimes, when you visit a website you may have seen something like http://woolie.co.uk/index.php in the address bar. This shows that they are using PHP as their scripting language to provide you with the page you are looking at. As you can see, the index.php is the script that is being ran. That is all there is to it, simply upload the file to your webserver’s public_html folder (that is if you are running on an Linux/Apache setup. It will be different if you are running on windows or are using something else). This folder is the public root. For example, when you go to woolie.co.uk, that is directing your request to the folder public_html, and the index.php file has been uploaded in that directory.
Why would I want to use PHP?
- PHP is very easy to use and has a small learning curve.
- It is Open Source Software (OOS).
- It is completely free.
- It can be used on just about any web-server set up.
- PHP is highly efficient and has excellent scalability opportunity’s.
Aaron
December 14th, 2006 at 11:24 pm
You forgot to put that it’s an object orientated programming language. But I guess you knew that already ^.~