PHP #1

11Dec07

To start with PHP you need to have a web server that supports PHP. You can either use a free web host, or run your own server. If you want to run your own web server on windows just download XAMPP. Once you have that downloaded and installed, all you do is save your PHP scripts in the htdocs folder (Same for all web servers) then navigate (in a web browser) to http://localhost/. Or if you are useing a free web host such as http://awardspace.com just upload the php scripts to the root directory (htdocs)

To write a PHP script you just open up a text editor (e.g Notepad, gedit etc) and write in the PHP script and save as filename.php make sure that it ends in dot ph.

Now to make sure that the server knows that it is a PHP script you musty have <?php at the beginning and ?> at the end.

So we will start with a basic Hello world! example. Write don’t copy this into your hello.php file:

<?php

echo "Hello World!";
?>

There you go a very simple PHP scrip.

Hope this helped, Pete Out

(Any Questions Just Ask)

If you liked this and are a nice person would you like to donate to my Stargate fund?



No Responses to “PHP #1”  

  1. No Comments

Leave a Reply




    HI, I'm Pete. I'm studying HND Computing and I'm trying to buy Stargate SG-1 Seasons 1 - 10 box set. I'm hoping that if I write lots of really useful information that some nice people might donate some money to me so I can buy all of the Stargate Seasons