Not Just Paranoid

Another site by Pete Maynard

PHP #1

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 using a free web host such as 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 php.

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:

	echo "Hello World!";

To find out information about your PHP server, such as what modules it has and which version, Man Page :


There you go a very simple PHP scrip.

Hope this helped, Pete Out

11 Dec 2007 | Tags ( PHP tutorial )

Website Last Updated on 15 Sep 2023 (CC BY-SA 4.0)

This site uses JQuery and nanogallery2 hosted by
for the Flickr photo feed and GoatCounter for user insights.