All pastes #495250 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-18 17:31 UTC
rendered paste body
 class _TemplateSystem
 {
   
   public function find_file($file_path)
    {
      
      ## $file_path = secureinput($filepath);
      
      if (file_exists($file_path))
      {
        
        $this->import($file_path);
        
      }
      else
      {
        
        die("_TemplateSystem::find_file(): $file_path cannot be found.");
        
      }
      
    } 
    
    public function import($file_path)
    {
      
      return $file_path;
      ob_start();
      include $filepath;
      $buffer_zone = ob_get_contents();
      ob_end_clean();
      return $buffer_zone;
      
    }  
 
 }