오타 수정및 주석문 추가

This commit is contained in:
YJSoft 2014-05-11 19:57:12 +09:00 committed by bnu
parent 49c74ef5cf
commit fde4ddee92

View file

@ -11,7 +11,7 @@
*/ */
class TemplateHandler class TemplateHandler
{ {
e
private $compiled_path = 'files/cache/template_compiled/'; ///< path of compiled caches files private $compiled_path = 'files/cache/template_compiled/'; ///< path of compiled caches files
private $path = NULL; ///< target directory private $path = NULL; ///< target directory
private $filename = NULL; ///< target filename private $filename = NULL; ///< target filename
@ -365,10 +365,12 @@ e
ob_start(); ob_start();
if(substr($buff, 0, 7) == 'file://') if(substr($buff, 0, 7) == 'file://')
{ {
//load cache file from disk
$eval_str = FileHandler::readFile(substr($buff, 7)); $eval_str = FileHandler::readFile(substr($buff, 7));
$eval_str_buffed = "?>" . $eval_str; $eval_str_buffed = "?>" . $eval_str;
@eval($eval_str_buffed); @eval($eval_str_buffed);
$error_info = error_get_last(); $error_info = error_get_last();
//parse error
if ($error_info['type'] == 4) if ($error_info['type'] == 4)
{ {
throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}"); throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}");
@ -379,6 +381,7 @@ e
$eval_str = "?>" . $buff; $eval_str = "?>" . $buff;
@eval($eval_str); @eval($eval_str);
$error_info = error_get_last(); $error_info = error_get_last();
//parse error
if ($error_info['type'] == 4) if ($error_info['type'] == 4)
{ {
throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}"); throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}");