Friday, May 2, 2014

Your First "Hello World" File in PHP

TEXT EDITOR FOR PHP
There are many text editor software available to code the PHP in the local webserver.Some of the text editor  to code  PHP are as follows:-
  • Notepad++
  • con Text
  • Dreamweaver
  • Notepad

 You can download one of the software like conTEXT from the following link:www.contexteditor.org/‎
After conTEXT or  Notepad++ you can start coding:

Below, we have an example of a simple PHP file, with a PHP script that uses a built-in PHP function "echo" to output the text "Hello World!" on a web page:

Example:
 <?php
echo "Hello World!";
?>

 We need to save this file inside the XAMMP directory  inside the folder name htdocs.
You need to save the file by putting .php after the name inside the htdocs Folder

After this we need to run this in our browser and check every code we write to know whether the written code is right or wrong.




 

No comments:

Post a Comment