Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
bring error handler example into the new views
Browse files Browse the repository at this point in the history
  • Loading branch information
colindean committed Oct 13, 2012
1 parent b61cc7b commit 8af7c70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
12 changes: 2 additions & 10 deletions target.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,9 @@ function errt(){

errorHandler(404, 'notFound');
function notFound($e){
//you must call $e->header yourself in order to output the appropriate header
$e->header();
print_head();
echo "Not found!";
}


function print_head(){
echo "<h1>Deano</h1>";
render("errors/404");
}

run();
?>

<p>end of target</p>
3 changes: 3 additions & 0 deletions views/errors/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h2>Not found :-(</h2>

<p>It appears that your content was not found. That's unfortunate.</p>

0 comments on commit 8af7c70

Please sign in to comment.