PHP文件没有在firefox中运行

时间:2016-09-20 10:23:05

标签: php ubuntu-16.04

Firefox只要求我下载该文件的来源。 View-source显示源代码。

a2enmod php7.0

Considering conflict php5 for php7.0:
Module php7.0 already enabled

php -v

PHP 7.0.8-0ubuntu0.16.04.2 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-0ubuntu0.16.04.2, Copyright (c) 1999-2016, by Zend Technologies

1 个答案:

答案 0 :(得分:1)

如果您打算开发一些东西,我建议您进行全面安装。

示例:Ubuntu 16.04.1 LTS(xenial)

sudo apt-get install php7.0 php7.0-cli php7.0-common php7.0-odbc php7.0-pgsql php7.0-sqlite3 php7.0-mysql php7.0-fpm php7.0-curl php7.0-intl php7.0-gd php7.0-mysql php7.0-bz2 php7.0-zip php7.0-gmp php7.0-json php7.0-xsl php7.0-tidy php7.0-xmlrp php7.0-readline php7.0-mbstring php7.0-mcrypt php7.0-recode php7.0-pspell php7.0-dev php-gettext libapache2-mod-php7.0