php file not parsed

(*-*)浩
Release: 2023-02-24 22:42:02
Original
3227 people have browsed it

apache cannot parse the php file

php file not parsed

I spent an afternoon on Baidu, and the root cause was that a php extension was missing: mod_php

Just restart apache after installation. (Recommended learning: PHP programming from entry to proficiency)

yum install mod_php
Copy after login

Other solutions

Found:

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

in its Add below:

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

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

The above is the detailed content of php file not parsed. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!