/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php class Template{ private $dir; public function __construct($dir) { } else { throw PHPTemplateException('Directory does not exists'); } } public function assign($variable, $data) { $this->data[$variable] = $data; } public function display($template) { return; } throw PHPTemplateException('File does not exists'); } private function __fetch($____FILE) { include( $____FILE ); } } class PHPTemplateException extends Exception { public function __construct($message) { parent::__construct('[PHP Template]:' . $message); } }
URL: http://www.talkphp.com/general/4844-php-template.html