Tuesday, July 12, 2011

How to Write a easy Php Script - 3 Quick Steps to Your First Php Script

I'm going to show you the exact steps I took on how to write a easy Php script. All things you've read about how easy it is to create websites using Php is very true.

In just a short while you'll be able to setup Php, a qualified web server called Apache and a database software, MySql in your local Windows machine. You don't need to buy any web hosting yet and you can simulate All things you see in live websites in your local computer. But don't get ahead of yourself. Leading thing is to relax and let's go step-by-step on how to write a easy Php script.

Apache

Step 1 - Download WampServer

Get ready to go insane if you plan to setup All things manually. The good guys at wampserver.com has a free Wamp (Windows, Apache, MySql, Php) factory package that will take out all the discontentment when installing an environment for development.

Step 2 - Open Your Text Editor

You don't indubitably need to buy an expensive text editor. You can just crusade online for some of these free capability text editors. Or you can just use Notepad if you like.

Step 3 - Write a easy Script

Create a new file and write the following code below. Save your file under C:-wamp-www and name it simple.php. The first line will basically yield "Hello World" to your browser. The second line will display today's date and the last line will yield the data with regard to your Php installation. You can see all of this by occasion up your browser and typing h t t p : / / localhost / simple.php

< ? php

echo "< p >Hello World< /p >";

echo "< p > The date today is: ". Date ( " F j, Y" );

phpinfo () ;

? >

How to Write a easy Php Script - 3 Quick Steps to Your First Php Script

No comments:

Post a Comment