2011-02-08 11 views
0

我正在檢查一個開源Web應用程序。有aproblem它使用error_get_last功能在這個代碼error_get_last函數中的緩存錯誤?

$last_error = error_get_last(); 
if($last_error['type'] === E_ERROR || $last_error['type'] === E_PARSE) { 
    include 'error.php'; 
} 
if (ob_get_length()) ob_end_flush(); 

,因爲它似乎它緩存舊代碼的老錯誤,不過編輯的代碼沒有任何錯誤這讓我很煩。因此它顯示了一段時間的舊錯誤。有誰知道如何解決這個問題?感謝您的幫助

編輯:我展示功能__shutdown(),其中在請求

function __shutdown() { 
    $logger_session = Logger::getSession(); 
    if (($logger_session instanceof Logger_Session) && !$logger_session->isEmpty()) { 
     Logger::saveSession(); 
    } // if 
    $last_error = error_get_last(); 
    if($last_error['type'] === E_ERROR || $last_error['type'] === E_PARSE) { 
     include 'error.php'; 
    } 
    if (ob_get_length()) ob_end_flush(); 
    } // __shutdown 
+0

什麼錯誤?我們應該猜測? – zerkms 2011-02-08 05:22:06

+0

它是流行的開源Web應用程序嗎?我們可以知道開源的名字嗎? – 2011-02-08 05:47:18

回答

1

功能error_get_last不緩存任何結束時運行的代碼,它就像substr功能和所有其他人。如果您看到的內容似乎被緩存,緩存將發生在不同的地方。也許你正在編輯錯誤的文件(或者你沒有真正解決錯誤),有一個操作碼或輸出緩存或其他。