1.打开web服务器(apache)的配置文件

2.找到 AddType application/x-gzip .gz .tgz

3.在下一行加入 AddType application/x-httpd-PHP.php

4.保存,重启web服务。