安装完Apache和PHP之后访问PHP文件页面提示下载而没有解析 解决办法

装好LAMP环境后,还要做下整合Apache与PHP相关配置,在apache配置文件里找到:
AddType application/x-gzip .gz .tgz
在该行下面添加
AddType application/x-httpd-php .php

添加默认的php首页,找到:
DirectoryIndex index.html
将该行改为:
DirectoryIndex index.html index.htm index.php
原文地址:https://www.cnblogs.com/xiaoping-2014/p/4457946.html