Search

Rss Posts

Rss Comments

Login

 

PHP – What is PHP (Dans Tutorial – Part 1)

Sep 09

PHP Stands for PHP: Hypertext Preprocessor, sounds confusing but it’s really not! With client side scripting such as Javascript the code is run once on the users computer so it’s to late for it to ask the server questions.  However with main different between PHP and other web languages such as Javascript as HTML is that PHP is run on the server. This means you can interact with other server functions such as MySQL and files.

PHP is a open source project, which means it gets bug fixes often and has a massive support index. If you have any questions you can be sure somewhere on the Internet someone has already solved it! PHP is free to download and use.

PHP Files are like HTML files, and indeed can contain standard HTML, Javascript and everything else a HTML document can contain, but they also allow you to run PHP code. A PHP document will have the file extension of either .php, .php3 or .phtml. The most often used extension is the .php extension and this is the one we will be using as this tutorial goes on.

Installing A Server

If you wish to use your remote hosting you can skip this step, but I highly recommend you install a server on your computer. This will allow you to test PHP code quickly and without as much effort as uploading it and sorting out FTP transfers. Installing a PHP enabled server is extremely easy thanks to the project ‘XAMPP’. Below is a quick tutorial of how to set up your own server.

First download the latest version from: the XAMPP website
When downloaded run the EXE.
When the installer opens click Next
Now you will see the Destination Folder Input.

image

In this box type where you would like to install the server. For example c:\MyServer. Click next Now you will be presented with a range of options, however unless you have a reason to do so, you can leave the options as the default values. Next click install. This will install the XAMP server on your machine. Once it’s installed go to Start – All Programs - Apache Friends – XAMPP - XAMPP Control Panel. This will open the XAMPP control panel.

image

Click start on Both Apache & MySQL. you can now go to http://localhost and see a web server has been setup. You’re now ready to get coding PHP! We’ll start with some coding in the next lesson tomorrow! Enjoy for now and remember to check back soon!

Post a comment