browser downloads php file from apache web server
问题 I have an apache web server. Let's say this server's domain is example.com . When I access example.com , then the index.php file is correctly displayed in the browser. However, when I access e.g. example.com/~user , then the index.php file of /home/user/public_html/index.php file is downloaded rather than displayed. How do I fix this problem? I changed "expose_php = Off" in php.ini , but nothing has changed. 回答1: If you are on Debian/Ubuntu take a look at this file /etc/apache2/mods-available