Home > Operation and Maintenance > Apache > How to solve the problem that apache cannot parse php files

How to solve the problem that apache cannot parse php files

王林
Release: 2020-11-02 15:42:33
Original
6405 people have browsed it

The solution to the problem that apache cannot parse php files: first add support for parsing php scripts; then modify the IfModule module to [DirectoryIndex index.html index.htm index.php] and increase the index of php.

How to solve the problem that apache cannot parse php files

The solution is as follows:

(Recommended tutorial: apache)

1. Find:

AddType application/x-gzip .gz .tgz
Copy after login

Add below it:

AddType application/x-httpd-php .php //添加支持对php脚本解析
Copy after login

2. Find:

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
Copy after login

Change the middle line to:

DirectoryIndex index.html index.htm index.php //增加对php的索引
Copy after login

Related recommendations: php training

The above is the detailed content of How to solve the problem that apache cannot parse php files. 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