Home  >  Article  >  Backend Development  >  Solution to the problem that the browser cannot open the php file

Solution to the problem that the browser cannot open the php file

王林
王林forward
2019-09-09 18:00:4016159browse

Solution to the problem that the browser cannot open the php file

There are generally three situations when the browser cannot open the php file:

Scenario 1: The web page displays blank, press F12, and a 404 error occurs.

Solution:

1. Search for IIS (Internet Information Service) in the start menu and press Enter to enter.

Solution to the problem that the browser cannot open the php file

#2. Find the management server option in the operation on the right and select Stop.

Solution to the problem that the browser cannot open the php fileSituation: The web page displays HTTP Error 404. The requested resource is not found. Press F12 and a 404 error appears.

Solution:

1. Search for services in the start menu and press Enter to enter

Solution to the problem that the browser cannot open the php file

2. Find SQL Server Reporting on the right Services (MSSQLSERVER) option, right-click and select Stop

Solution to the problem that the browser cannot open the php file

Case 3: Unable to display the webpage

Solution:
1. In the wamp installation directory Find the D:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf file,

2. Then add the following code:

     <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host2.localhost
        DocumentRoot "D:\wamp\www"
        ServerName localhost
    </VirtualHost>

Solution to the problem that the browser cannot open the php file

Note: 80 is the port number of wamp, D:\wamp\www is your php storage folder (mine is placed in the www directory),
localhost It is the path name you want to enter in the URL. You can name it whatever you want, 127.0.0.1 is also fine.

3. Save and restart wamp

4. Enter localhost:xx.php in the browser, and the php file can be opened.

The above content is for reference only!

Recommended video tutorial: PHP video tutorial

The above is the detailed content of Solution to the problem that the browser cannot open the php file. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete