如果你的www服务器是apache的话, 你在配置文件 httpd.conf 里任意一个地方(不是被注释就行) 加上这句 AddType application/x-httpd-php .php .html