PHP文件下载而不是显示文件

时间:2016-02-04 17:40:30

标签: php apache

我在网上看了很多答案,但没有一个有效。我有一个带有一些html的.php文件,它在localhost上完美运行,但是当我从网站上运行它时我想要实际使用它,它会下载文件而不是显示它。我试过更改我的httpd.conf文件以包含行

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

LoadModule php5_module        modules/mod_php55.so

但这仍然没有改变任何事情。

我正在使用XAMPP,下载包含php,所以我不认为这是一个没有安装的问题。我正在使用OS X(El Capitan),如果这会产生影响或帮助任何人提出解决方案。

截至目前我已经去过的链接:

Apache is downloading php files instead of displaying them https://askubuntu.com/questions/447675/index-php-is-downloading-instead-of-displaying http://ubuntuforums.org/showthread.php?t=2220415

0 个答案:

没有答案
相关问题