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

Popular posts from this blog

objective c - Deep Linking for iOS Apps which are not installed yet? -

Java 8 + Maven Javadoc plugin: Error fetching URL -

java - Unable to publish my application to WAS 7.0.0.29 on RAD 7.5.5.5 iFix1 -