HS Banner
Your first PHP-enabled page

Author: Admin 11/30/2023
Language: PHP
Views: 629
Tags: php hello world html


This is a basic PHP page for beginners.


Create a file named index.php and put it in your web server's root directory (DOCUMENT_ROOT) with the following content.


<!DOCTYPE html>
        <title>PHP Test</title>
        <?php echo '<p>Hello World</p>'; ?>

This is a basic HTML page with a PHP tag using echo to output Hello World.

Now that you have successfully created a working PHP script, it is time to create the most famous PHP script! Make a call to the phpinfo() function and you will see a lot of useful information about your system and setup such as available predefined variables, loaded PHP modules, and configuration settings. Take some time and review this important information.

Replace the <?php echo '<p>Hello World</p>'; ?> Hello World tag with this.

<?php phpinfo(); ?>

Add Comment
There are no comments yet.