Sunday 11 January 2015

Create Your First PHP Script

Create Your First PHP Script

PHP script are merely plain-text files containing PHP instruction,something combined with other odds and ends-JavaScript,HTML, and so on. So,the simplest way to write PHP script is to pop open your favourite text editor and Create a file containing some PHP code,as follows:

<?php
//this line of code display a famous quotation
echo 'A horse! A horse! My Kingdom for a horse!';
?>

Save this file to a location under your Web server's document root, and name it horse.php. Then,start up your web browser ,and browse to the URL corresponding to the file location. You should see something like figure



No comments:

Post a Comment