How to Generate a Basic PHP Script – three Rapid Methods to Your First PHP Script

Posted in WordPress on Jul 22, 2014

I’m heading to present you the correct techniques I took on how to generate a simple PHP script. All the things you’ve study about how simple it is to create internet websites using PHP is pretty legitimate.

In just a quick whilst you can be ready to install PHP, a effective world wide web server identified as Apache and a databases computer software, MySQL in your neighborhood Home windows equipment. You you should not will need to obtain any net hosting still and you can simulate every thing you see in live internet websites in your nearby pc. But don’t get forward of your self. Vital point is to unwind and let us go move-by-phase on how to publish a straightforward PHP script.

Phase 1 – Download WampServer

Get prepared to go crazy if you program to set up almost everything manually. The great men at wampserver.com has a free of charge WAMP (Windows, Apache, MySQL, PHP) installation bundle that will acquire out all the aggravation when putting in an setting for advancement []).thrust()

Move 2 – Open Your Text Editor

You do not truly need to obtain an highly-priced textual content editor. You can just lookup on line for some of these cost-free good quality textual content editors. Or you can just use Notepad if you like.

Step 3 – Compose a Straightforward Script

Build a new file and generate the subsequent code down below. Preserve your file under C:-wamp-www and name it simple.php. The 1st line will in essence output “Good day Globe” to your browser. The 2nd line will display present-day day and the previous line will output the information and facts about your PHP installation. You can see all of this by opening up your browser and typing h t t p : / / localhost / uncomplicated.php

&lt ? php

echo “&lt p &gtHello Planet&lt /p &gt”

echo “&lt p &gt The date currently is: “. date ( ” F j, Y” )

phpinfo ()

? &gt

By Robert Gutmans

Leave a Reply

Your email address will not be published. Required fields are marked *