Create your first PHP-enabled page

19 14
Read Time:42 Second
Hello,

Today I will explain how you can create your first php enabled page. A PHP script starts with
  <?php and ends with ?>

 First of all open any text editor(notepad++)

create a file name index.php and put it in your web server’s root OR /www OR puclic_html directory with the following content.

<html>
<head>
<title>Homepage</title>
</head>

 <?php
 echo ‘Hello World’;
 ?> 

</body>
</html>

Use your default browser to see output of this code with your web server’s url ending with the /index.php
If you are using localhost then try http://localhost/index.php or http://127.0.0.1/index.php

If everything is fine you will see result like

Hello World

Thank you.

About Post Author

Vishal Barot

Hi there, Vishal Barot here. Full-time web developer and graphic designer with over 10 years of experience. I've been experimenting with web development since I was 17 years old. If you are looking to have a professional website or design then I can develop it for you. Looking forward to working with you.
Happy
Happy
16 %
Sad
Sad
16 %
Excited
Excited
14 %
Sleepy
Sleepy
18 %
Angry
Angry
18 %
Surprise
Surprise
18 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Comment

Your email address will not be published. Required fields are marked *

The maximum upload file size: 1 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop files here