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

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

王林
Release: 2023-02-23 20:36:02
forward
16174 people have browsed it

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>
Copy after login

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!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template