apache - Get error description with .htaccess/PHP -
i'm running apache server, , want custom php error page display error number , error description. example, have in .htaccess:errordocument 404 /?e=404
and in error page:
<?php $e = $_get['e']; if($e === 404){ ?> error: <?=$e?> <?php } ?>
so display:
error: 404
want show description too, such as
error: 404 not found
without having pull database etc. in php. possible pass parameter or .htaccess?
as far know, there no magic can translate error code in description you. doesn't mean can't continue on path took:
errordocument 404 /?e=404&desc=not%20found
now errorcode in $_get['e']
, description in $_get['desc']
.
Comments
Post a Comment