尝试在httpd.conf中添加: <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> 然后重新启动apache服务