首先进入终端,执行:
sudo chmod -R 777 /etc/php5/apache2
sudo chmod -R 777 /etc/apache2
然后在/etc/apache2/apache2.conf中的
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
下面添加:
# 解析php
Include /etc/apache2/mods-available/php5.load
Include /etc/apache2/mods-available/php5.conf
即可。