mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
file cache 사용시 오류 예외처리가 되지 않던점 수정 & 오타 수정
include문 사용시 parse error 예외처리가 불가능함으로 FileHandler::readFile로 읽어 들인뒤 eval하는 방식으로 수정하였습니다. 추가:pharse가 아니라 parse네요;;;
This commit is contained in:
parent
b9a515c101
commit
96de92beed
1 changed files with 9 additions and 2 deletions
|
|
@ -365,7 +365,14 @@ class TemplateHandler
|
|||
ob_start();
|
||||
if(substr($buff, 0, 7) == 'file://')
|
||||
{
|
||||
include(substr($buff, 7));
|
||||
$eval_str = FileHandler::readFile(substr($buff, 7));
|
||||
$eval_str_buffed = "?>" . $eval_str;
|
||||
@eval($eval_str_buffed);
|
||||
$error_info = error_get_last();
|
||||
if ($error_info['type'] == 4)
|
||||
{
|
||||
echo "<p>Error Parsing Template - {$error_info['message']} in template file {$this->file}</p>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -374,7 +381,7 @@ class TemplateHandler
|
|||
$error_info = error_get_last();
|
||||
if ($error_info['type'] == 4)
|
||||
{
|
||||
echo "<p>Error Pharsing Template - {$error_info['message']} in template file {$this->file}</p>";
|
||||
echo "<p>Error Parsing Template - {$error_info['message']} in template file {$this->file}</p>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue