使用apache服务器的情况:
httpd.conf文件:
-------------
# ...
# Minimize 'Server' header information
ServerTokens Prod
# Disable server signature on server generated pages
ServerSignature Off
# ...
# Set default file type to PHP
DefaultType application/x-httpd-php
# ...php.ini文件:
------------
; ...
expose_php = Off
; ...详见:
http://ir.php.net/manual/zh/security.hiding.php