We can run our PHP script in our own computer

In php script, we talk about website programming. For the PHP, we can use mathematics method like add, divide, subtract or multiple number. In php we can use database, usually use Mysql databases. We can make php condition for save it to databases.

But… sometimes our php condition that we have been created was false so our website display error. For know that error before we upload the php script to our online hosting, we can check it first at our own computer.

For check it, we need software testing tool that can make our computer become localhost server and can running even we are not using internet connection . For this, I use Appserv as unit testing. Install that software and it will make our computer become server like hosting server that we usually use.

Check it works or not. After you installed appserv, and reboot, at your web browser you can type http://localhost , and you will see our appserv localhost web page. And for our PHP file, we MUST place it at :

c:/appserv/www/our_folder

This is for separate one full php web script with other script for easier. For test our php script, type at browser :

http://localhost/our_folder

And this same as with

http://localhost/our_folder/index.php

Now we can test our php script, for know the error or our web display like what.  Also we can use html page.
So with AppServ we can browse our script as like as we browse it online. Now your localhost can be as test driven development for check your php script before you upload it to online hosting.

Respond to this post