您還需要爲.php文件設置正確的內容處理程序/ MIME類型。默認的Ubuntu php配置包含: -
<IfModule mod_php5.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_value engine Off
</Directory>
</IfModule>
</IfModule>
您是否重新啓動了Apache? – jprofitt 2012-01-12 03:34:10
確保重新啓動apache並嘗試更新權限。 – 2012-01-12 03:35:11
我沒有對配置文件進行更改,該配置文件已存在多年。 – WildBill 2012-01-12 03:36:17