php 7文件被下载而不是执行 [英] php 7 file is downloaded instead instead of executing

查看:64
本文介绍了php 7文件被下载而不是执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近通过在博客 http://www.zimuel.it/上在Ubuntu 14.04上配置了php7.install-php-7 ,我已经按照博客成功安装了它.但是,当尝试运行php文件(/var/www/test.php)时,则会下载该文件而不是执行该文件.我不知道我错过了什么配置.并且当我在浏览器中输入localhost时,它会带有响应它有效".

I recently configured php7 on Ubuntu 14.04 by following blog http://www.zimuel.it/install-php-7 and I installed it successfully as per blog. but when try to run the php file (/var/www/test.php) then it is downloaded instead of executing. I have no idea what configuration I missed. and when I entered localhost in browser then it comes with response "it works".

推荐答案

在/etc/apache2/sites-available中的apache配置中,尝试删除带有注释的以下行:

In your apache configuration in /etc/apache2/sites-available try to remove this lines with comments:

#RemoveHandler .php
#RemoveHandler .php7.0
#php_admin_value engine Off

这篇关于php 7文件被下载而不是执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆