轉自 http://stackoverflow.com/questions/15530039/how-to-write-to-error-log-file-in-php

--

error_log("錯誤訊息\n", 3, "/mypath/php.log");

第一參數表示要寫入的訊息內容;第二參數"3"表示指定寫入的檔案;第三參數為指定寫入的檔案路徑。

--

If you don't want to change anything in your php.ini file, you can do this.

 

error_log("Error message\n", 3, "/mypath/php.log");

 

The first parameter is the string to be sent to the log. The second parameter 3 means expect a file destination. The third parameter is the log file path.

--

arrow
arrow
    全站熱搜

    dizzy03 發表在 痞客邦 留言(0) 人氣()