2016-08-05 35 views

回答

0

您可以在catch塊做到這一點:

try { 
    foo(); 
} catch (Exception $e) { 
    error_log("Caught $e"); 
} 

還是在異常處理程序:

set_exception_handler(function($exception) { 
    error_log($exception); 
    error_page("Something went wrong!"); 
}); 
相關問題