首先是缺少php相应的模块
LoadModule php5_module libexec/libphp5.so
如果libphp5.so不存在的话,去网上下载一个,放到libexec里面就好了。
然后在http.conf下面添加
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
AddType application/x-httpd-php .php .phtml .php3 .php4
AddType application/x-httpd-php-source .phps
让他增加文件得识别类型
然后重启Apache就行了