What to do if the php file cannot be opened

藏色散人
Release: 2023-03-02 06:08:02
Original
9234 people have browsed it

The php file cannot be opened because there is no php running environment. The solution: first confirm whether the installed PHP development environment is correct; then find "Apache start" and manually open the Apache server; finally enter " localhost:8080" to determine whether the web page can be opened normally.

What to do if the php file cannot be opened

php files cannot be opened directly in the browser because Php is a programming language and must be interpreted by the server before it can be viewed on the browser.

If the machine does not have a running environment, it cannot run. If you view it directly with IE browser, you will be prompted to download or other problems will occur. If you want to see the source code, you can open it with a tool like Notepad.

If you want to use IE browser to view it, you need to use the following method. The specific steps are:

1. First, confirm whether the installed PHP development environment is correct, enter the "www" of PHP ” folder, as shown in the figure below.

What to do if the php file cannot be opened

2. Secondly, open Start->All Programs->AppServ->Control Server by Manual->Apache start, as shown in the figure below.

What to do if the php file cannot be opened

3. Then, after manually opening the Apache server, enter: localhost:8080 in the browser to see if the web page can be opened normally, as shown in the figure below.

What to do if the php file cannot be opened

4. Then, the entered URL opened a website, but it was found that the name of this website was also in the "WWW" file in the first step. Use DW software to open the "WWW" "index.php file in the file, as shown below.

What to do if the php file cannot be opened

5. Finally, enter: localhost:8080/1.php in the browser. You can find that the location corresponding to localhost:8080 is the "WWW" file, which means it is successfully used. The php file was opened in IE browser, as shown in the figure below.

What to do if the php file cannot be opened

For a lot of related knowledge, please visit PHP Chinese website!

The above is the detailed content of What to do if the php file cannot be opened. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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