Friday, October 31, 2014

Learning PHP (1)

We'll learn how to make a php webpage hosted on our xampp server. I hope you have already installed xampp, if not then you can follow this article to install xampp.

All the websites which you want to host on xampp are stored in htdocs folder in xampp, you can change the ports and folder in http.conf



Normally it is hosted on port 80 and files should be accessed from htdocs folder. Lets start making our first php file (first.php) and place it in htdocs folder and write

<?php
?>

<?php is the start tag of a php file while ?> is the end tag. Now put  
echo "hellow! this is my first php file";  inside <?php ?> tags

now access the file in browser, the address you will use will be http://localhost/first.php, but make sure xampp server is running before accessing the file.

TADAA!!! This is our first php program off and running, Next we will work on php codes and will make different small web apps. see you, In case of any issues feeel free to contact me

No comments:

Post a Comment