|
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
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 |
|
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. |
|
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.
|
|