How to print custom error when trying to include/require a php file ?
This was my idea:
<?php
try{
include "template/".$_GET['view'].".php";
}
catch (Exception $e){
echo 'some error code';
};
?>
But, still I'm getting default error if required file don't exist.