Home >Backend Development >PHP Problem >What to do if linux apache does not parse php files

What to do if linux apache does not parse php files

藏色散人
藏色散人Original
2020-08-25 09:11:263830browse

Solution to the problem that linux apache does not parse the php file: first find and open the "httpd.conf" file; then add the code content as "AddType application/x-httpd-php .php" and save it.

What to do if linux apache does not parse php files

Recommended: "PHP Video Tutorial"

Solve the problem that Apache cannot parse PHP

Edit the httpd.conf file

Add the following code

LoadModule php7_module modules/libphp7.so
AddType application/x-httpd-php .php
DirectoryIndex index.php index.htm index.html

The first sentence will be automatically generated after installing php

The above is the detailed content of What to do if linux apache does not parse php files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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