1. First, download WampServer, a free software that quickly builds a local server, on the Internet. You can find the download by searching "WampServer" on Baidu.
#2. After downloading, double-click to install WampServer and keep selecting "next" to complete the installation.
#The default software language is English , we can modify it back to Chinese. After the installation is complete, open the software, right-click the small software icon in the lower right corner of the computer, select Language, and select the language "Chinese". Click the software icon and select the www directory which is the root directory of the local server; select phpmyadmin to open the database. The local server is set up successfully. Enter "localhost" in the browser to access the root directory of the local server. As shown in the picture, if access fails, the server is not started. We check whether the WampServer service is started. The icons for the started and not started are different. It's red. We can start all services. If you still cannot successfully access the local server, it means that port 80 of this machine is occupied. Usually, the same type of software is installed. The software uses Apache and is occupied. Find it, disable it, and then restart WampServer. Recommended tutorial: "php tutorial"
The above is the detailed content of How to set up a local server in php. For more information, please follow other related articles on the PHP Chinese website!