I am trying to get expose_php to off with ini_set, except it seems to not be working. I tried the value 0, and Off, but neither work.
ini_set('expose_php',0);
help?
http://php.net/manual/en/ini.core.php
It can only be set in php.ini.
If you are on PHP >= 5.3.0:
header_remove('X-Powered-By');
http://www.php.net/manual/en/function.header-remove.php
Or on an older version:
header('X-Powered-By: ');
(This will hide PHP and the version, but the "X-Powered-By" string will still be visible in the header.)
However the PHP version might still be visible in the "Server: " part of the header. So this isn't bulletproof.
Overwrite the header:
header('X-Powered-By: ');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With