Changeset 53

Show
Ignore:
Timestamp:
24/08/06 09:29:18 (7 years ago)
Author:
dez
Message:

Adds "file not found" functionality to static component

Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • components/static.php

    r37 r53  
    88else 
    99        $title = "Static Page Producer"; 
    10 $smarty->assign("title", $title); 
    1110 
    1211$smarty->assign("body", "wantfile=$path"); 
     
    1413if (file_exists($myfile)) { 
    1514        $smarty->assign("body", file_get_contents($myfile)); 
     15} else { 
     16        header("HTTP/1.1 404 Not Found"); 
     17        $smarty->assign("body", file_get_contents("static/404.txt")); 
     18        $title="File not found"; 
    1619} 
    1720 
     21$smarty->assign("title", $title); 
     22 
    1823?>