這是因為我們的伺服器會關閉所有 PHP 的 error message 輸出,當客戶的 PHP 程式語法錯誤,或執行時出錯而導而 PHP 不能執行,便會看到空白頁面,而不會輸出錯誤.
如果客戶需要查看 error mesage 進行 debug,可以在 php 程式的第一行,加入以下一句查看所有 error message, 方便 debug:
<?php
error_reporting(E_ALL);
// your php code here
?>
這是因為我們的伺服器會關閉所有 PHP 的 error message 輸出,當客戶的 PHP 程式語法錯誤,或執行時出錯而導而 PHP 不能執行,便會看到空白頁面,而不會輸出錯誤.
如果客戶需要查看 error mesage 進行 debug,可以在 php 程式的第一行,加入以下一句查看所有 error message, 方便 debug:
<?php
error_reporting(E_ALL);
// your php code here
?>
You cannot comment on this entry