Showing posts with label first program in php. Show all posts
Showing posts with label first program in php. Show all posts

31 July 2012

MY First Program in PHP

40 comments

first php program
After installing all the prerequisites for setting up PHP environment like installing LAMP server, installing PhpMyAdmin we are now able to start with writing our first program in php. Lets start

Step 1: If you are using Linux system, then first go to /var/www/ directory.

Step 2: Create php file called first.php.

Step 3: Using your favorite text editor, open this file and write the following code and save it.

<?php
echo "My first program in php";
?>

Step 4: Now open your browser and enter following url to execute it localhost/first.php

first program in php

Note: <?php and ?> are opening and closing tags.
Read More...