Home >Backend Development >PHP Problem >What to do if the php file cannot be opened
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.
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.
2. Secondly, open Start->All Programs->AppServ->Control Server by Manual->Apache start, as shown in the figure below.
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.
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.
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.
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!