PHP Function Lookup:
PHP Quick Start
PHP Installation
PHP Articles
PHP Scripts

Top Rated Articles 

Site Related
Submit Articles/Code
Contact Us
Instant cash loans, cash advance online same day

   Home                   Article Added on: March 31, 2002
Running a sample PHP code to test your webserver

Overview: Okay you have installed PHP on your computer, now lets write some simple PHP scripts to see if you have installed PHP correctly on your computer.

We will be putting the files that we create here in the virtual directory mybuddy that we have created earlier. For more info on creating the virtual directory under IIS click here.

1) Cut and paste the code below and save it as first.php under c:\inetpub\wwwroot\mybuddy

first.php View Sample Output

Run this code from your machine!
* This above option is applicable only if you have saved the file under the virtual directoy mybuddy

How do I execute the php code that I wrote on my computer?
Open your web browser and enter this url http://localhost/mybuddy/first.php
The basics are http:// your_server_name / your_virtual_directory / filename.php

One more example:second.php View Sample Output

Run this code from your machine!

Common Errors If you get some error make sure the file name ends with .php extension.
If the source code appears as it is when you execute your code on the browser and not the output you expect then PHP has not been properly installed. Please refer here to manually configure PHP on IIS Server.

    Send this Article to your Friend!
Your Name Friend's Email
Rate this article:  Current Rating: 4.47
  Poor    Excellent     
          1     2    3    4    5

Other Related articles:


Home | Privacy Policy | Contact Us | Terms of Service
(c) 2002 - 2019 www.PHPbuddy.com Unauthorized reproduction/replication of any part of this site is prohibited.