Home > Backend Development > PHP Tutorial > linux安装 apache php 无法解析,该怎么处理

linux安装 apache php 无法解析,该怎么处理

WBOY
Release: 2016-06-13 12:03:25
Original
1467 people have browsed it

linux安装 apache php 无法解析
ubuntu12.04 的环境 用apt-get安装apache2 和php5 libapache2-mod-php5 测试apache能够访问,访问php文件就变成下载文件了,下载php文件显示php解析后的结果

------解决方案--------------------
可能是MIME声明有问题吧
你可这样测试一下:
1、建一个 a.php 内容为
echo __FILE__;

2、建一个 b.php 内容为
print_r(get_headers('http://localhost/a.php'));

然后执行 b.php, 看最终得到的结果是什么

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