How do I run my php file in my computer?

Asked By 10 points N/A Posted on -

My computer OS is Windows XP and i was wondering if there is any way i can run PHP script on the computer?

I have just installed Wamp5 and have Apache and PHP now.

But I don't know what to do make the script work.

Can some one to help me to solve my problem.

Thank You.

Best Answer by rootsiroot
Answered By 0 points N/A #120148

How do I run my php file in my computer?


First of all code a PHP file and then save it in the form of test.php . Make sure that it ends with a PHP extension. Otherwise their will be problems. Now run the Wamp server and go to the system tray icon. Go there and start all the services and make sure that they are running. PHP, Mysql and Apache are the main ones that need to be run.

Now open your browser and the go to local host and point to the location in which the test.php is present and you will be easily able to test your PHP file and your php skills. The main things you need to keep in mind are make sure that all the services are running and the PHP file extension which needs to be present.


Answered By 0 points N/A #120146

How do I run my php file in my computer?


You can run the PHP script by successfully installing the PHP and by commanding the script using the notepad.

As you said you already installed the wamp5 and PHP, you can now start using the command line that the engine of PHP provided you in the Window command or use the notepad to input the PHP script .

You may now save the filename.php and choose the file as “All files”.

However, if the method above didn’t solve the error, you can try to input this command line : http://localhost/phpmyadmin or this: http://localhost/index.php

Then run your scrip as this: -http://localhost/filename.php-

Best Answer
Best Answer
Answered By 0 points N/A #120149

How do I run my php file in my computer?


Hello Dishantd,

Good day to you!

You said you have installed WAMP5 and you have APACHE and PHP in your machine. And I assume you have a ready script for testing in your machine too. And your problem now is how to make the script work.

To refresh everything, kindly restart your computer and follow the steps below.

1. Double click the WAMP icon in your desktop or go to Start > Programs > WAMP > start WAMP Server.

After doing the Step 1, the WAMP server has started and is visible on your system tray. [Your system tray can be found on you lower right on your monitor.

2. Now, go in to your system tray and look for the WAMP server icon. And then click the WAMP server icon and click Start All Services.

Note: Make sure your PHP script is saved under the www folder.

3. After doing the Step 1 and 2, go to your web browser. And type below line:

http://localhost/<your script file here>

Example: http://localhost/sampleWAMP.php

4. Done. Congratulations.

Answered By 5 points N/A #120150

How do I run my php file in my computer?


PHP is a server side scripting language and it is widely used for web developments and can be embedded into HTML. PHP runs only on server's ( Web server ). To make PHP run on your local system or computer your computer should act as a server. There are freely available softwares to make a computer, virtual server.

The best software that I recommend is " xampp ". Search in Google for " xampp ", download it and use it as your server.

Related Questions