This article will guide you through the complete process of running PHP applications on AppServ. With these simple steps, you'll quickly configure and run PHP applications.
First, double-click the AppServ icon on your desktop, or start AppServ from the Start menu.
In the AppServ control panel, check if the PHP service is running. If it isn't, click the 'Start' button to start the PHP service.
Open the AppServ control panel and click the 'Settings' tab. In the 'PHP Settings' section, ensure the 'PHP.exe Path' points to the PHP executable file. The default path is typically 'C:\AppServ\PHP5\php.exe'.
Next, create a PHP file containing your code. For example, create a file named 'hello.php' and input the following code:
<?php<br>echo "Hello, world!";<br>?>
The default document root for AppServ is located in 'C:\AppServ\www'. Copy or move your 'hello.php' file into this directory.
In your browser, enter the following URL to access your PHP file:
http://localhost/hello.phpIf everything is set up correctly, the browser should display 'Hello, world!'.
That’s all for running PHP applications on AppServ. If you run into any problems, check the configurations and ensure all required PHP extensions are installed.