所以我想獲得一個fopen和fread語句來顯示日誌,並且每個條目格式化爲一個新行,我如何讓我的代碼以.txt格式進入,PHP fopen和fread正確的格式
.TXT:
[2014/1/19 - 22:49:37] Josh (IP:174.101.171.132) has edited auction 0 expire time to 60
[2014/1/19 - 22:49:43] Josh (IP:174.101.171.132) has edited auction 0 enabled to 1 (Enabled)
[2014/1/19 - 22:49:51] Josh (IP:174.101.171.132) has edited auction 0 item description to Free House
[2014/1/19 - 22:49:59] Josh (IP:174.101.171.132) has edited auction 0 starting bid to 5000000
[2014/1/19 - 22:50:31] Josh (IP:174.101.171.132) has edited auction 0 enabled to 0 (disabled)
[2014/1/19 - 22:50:37] Josh (IP:174.101.171.132) has edited auction 0 item description to none
[2014/1/19 - 22:50:45] Josh (IP:174.101.171.132) has edited auction 0 item description to (none)
[2014/1/19 - 22:50:50] Josh (IP:174.101.171.132) has edited auction 0 starting bid to 0
[2014/1/20 - 11:40:09] Josh (IP:174.101.171.132) has edited auction 0 item description to Testing House
[2014/1/20 - 11:40:14] Josh (IP:174.101.171.132) has edited auction 0 expire time to 1
[2014/1/20 - 11:40:18] Josh (IP:174.101.171.132) has edited auction 0 starting bid to 1
[2014/1/20 - 11:40:21] Josh (IP:174.101.171.132) has edited auction 0 enabled to 1 (Enabled)
PHP返回:
[2014/1/19 - 22:49:37] Josh (IP:174.101.171.132) has edited auction 0 expire time to 60 [2014/1/19 - 22:49:43] Josh (IP:174.101.171.132) has edited auction 0 enabled to 1 (Enabled) [2014/1/19 - 22:49:51] Josh (IP:174.101.171.132) has edited auction 0 item description to Free House [2014/1/19 - 22:49:59] Josh (IP:174.101.171.132) has edited auction 0 starting bid to 5000000 [2014/1/19 - 22:50:31] Josh (IP:174.101.171.132) has edited auction 0 enabled to 0 (disabled) [2014/1/19 - 22:50:37] Josh (IP:174.101.171.132) has edited auction 0 item description to none [2014/1/19 - 22:50:45] Josh (IP:174.101.171.132) has edited auction 0 item description to (none) [2014/1/19 - 22:50:50] Josh (IP:174.101.171.132) has edited auction 0 starting bid to 0 [2014/1/20 - 11:40:09] Josh (IP:174.101.171.132) has edited auction 0 item description to Testing House [2014/1/20 - 11:40:14] Josh (IP:174.101.171.132) has edited auction 0 expire time to 1 [2014/1/20 - 11:40:18] Josh (IP:174.101.171.132) has edited auction 0 starting bid to 1 [2014/1/20 - 11:40:21] Josh (IP:174.101.171.132) has edited auction 0 enabled to 1 (Enabled)
對不起,我已經編輯您發佈兩次,第一次編輯我清理在下部的混亂,直到我意識到,這是你的實際問題。 ;) – lxg 2014-09-13 18:58:47