Home  >  Article  >  Backend Development  >  lamp访问的时候index.php时直接下载了该文件

lamp访问的时候index.php时直接下载了该文件

WBOY
WBOYOriginal
2016-06-23 13:06:341226browse

这个原因是因为Apache无法解析php文件

vim /etc/httpd/httpd.conf

addType application/x-httpd-php .php

AddType application/x-httpd-php-source  .phps


    DirectoryIndex  index.php index.html


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