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. This blog is a space where I share insights, experiences, and knowledge about the digital world. From programming languages I’ve mastered to internet scams and fraud to watch out for, you’ll find a mix of practical tips and cautionary tales. Whether you're a fellow developer, designer, or just a curious reader, I hope my posts provide value and spark your interest.