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.
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.



Comments