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.