First php Program

First php Program

First Php Program

 

Create a file named hello.php and put it in your web server's root directory (Xampp/htdocs) with the following content

 

<?php

    echo " hello World ";

?>

 

 

In php programming Language,  php code start with ‘ <?php ‘  and End With ‘ ?> ‘  .

Example :

<?php  //Php Start

// Write Your code here.

?>// php End Or close.

 

Use your browser to access the file behind your web server's URL, ending behind the /hello.php file suggestion. When developing locally this URL will take steps this area http://localhost/hello.php or http://127.0.0.1/hello.php but this depends a propos the subject of the web server's configuration. If anything is configured correctly, this file will be parsed by PHP and the in The freshen of output will be sent to your browser:

Result : Hello World.

This program is enormously easy and you in fact did not dependence to use PHP to make a page when this. All it does is display: Hello World using the PHP echo statement. Note that the file does not need to be executable or special in any mannerism. The server finds out that this file needs to be interpreted by PHP because you used the ".php" strengthening, which the server is configured to adding going on upon to PHP. Think of this as a ample HTML file which happens to have a set of special tags easygoing to you that realize a lot of tempting things.

 

Thank You for visit Webriceter.com Design & Develop by Abdur Rahaman