Your First PHP Program
You can create PHP program in any text editor. All PHP program should have saved with file extension .php
To create your first PHP program, open your text editor like NOTEPAD or EDIT PLUS (Do not use MS Word or other rich text editor to create PHP scripts.
Put following code to text editor and save it as phpinfo.php
<HTML>
<HEAD>
</HEAD>
<BODY>
<?php
phpinfo();
?>
</BODY>
</HTML>
Now save the file and upload it to your web server and call the file. This small program will show configuration of your PHP installation and web server.
As you have seen, PHP programs are embedded in HTML code. Every PHP program start with <?php and end with ?>
|