php

404 not found from php giving blank page instead of error page

This PHP code

header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
exit;

gives blank page in firefox and safari. Not in other browsers, though, they are displaying correct error page. I was looking for an answer on how to get a proper 404 not found error page to be displayed in these browsers, and if something was wrong with my php code. But apparently there was nothing to worry about, Safari and Firefox do not have default error pages!

Subscribe to RSS - php