First PHP program

Before proceeding to programming part first check whether you have installed XAMPP correctly.
You can do this check by typing "http://localhost/" in your browser which shows XAMPP page then
you have done installation perfectly.

First PHP program - hi.php

<?

echo "Hi";

?>

echo is the keyword to print some data. Save the file as hi.php in "c:/xampp/htdocs/" folder.
You can view the output by typing "http://localhost/hi.php" in your browser.

Output

Hi

You can also save your files in an separate folder like "c:/xampp/htdocs/pro/hi.php"
then give url link as "http://localhost/pro/hi.php" Htdocs is the apache web directory
where you can save your web pages. Localhost is like domain name which points to
your webserver.


 del.icio.us  Technorati  Digg 

 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this entry.
Comments
  • No comments exist for this entry.
Leave a comment

Submitted comments will be subject to moderation before being displayed.

 Enter the above security code (required)

 Name

 Email (will not be published)

 Website

Your comment is 0 characters limited to 3000 characters.