This blog is made to help students with creating first webpage in PhP.
Prerequisite :
1. Already the tool XAMPP is installed if not click this
Link For XAMPP.
2. Notepad or any text editor should be available . Links for the some are Sublime (
Link) or Brackets (
Link)
The process is divide into three steps
1. Steps to start Xampp
2. Creating Your First Webpage
3. Opening your First Webpage
4. Small Activity
--------------------------------------------
Steps to Start Xampp
1. Open the XAMPP control panel as shown below
2. Click Start
3. And the following screen will appear
4. The status should be running else if error something will
appear in red. If you have error trying close the applications like Skype,
Oracle as they might be using the same port. Or we can change port for
localhost in our case
Then click Explore to go to the folder htdocs . This folder
contains your all webpage
You are good to go with it , well done
Step 2 : Creating Your First Webpage
1. Open a Notepad of any texteditor of your choice and copy the following code as shown below
<!DOCTYPE html>
<html>
<body>
<?php
echo "My first PHP script!";
?>
</body>
</html>
-------------------------------------
2 . Save the file as FirstTry.php as shown below
Make sure to store the file in your htdocs as shown below
3. Once you saved the file , you are good to watch your very own first
web-page
Step 3: Opening your First Webpage
1. Open Google Chrome or Internet Explorer and type the following as shown also in picture
http://localhost/myfirstweb/FirstTry.php
2. You can see your webpage
Test Activity
Create another page titled "MyName.php" and add your name instead of myscript