我有我通過命令行運行像打印更好的格式化
php file.php
,並在該文件中我有一個像
print "<br>Saved the url: {$url} to :{$destination}";
我以爲BR將打印語句PHP腳本Formant it 1 below other,but when I run the script,I get this format that is hard to read
<br>Saved the url: http://example.com/a.mp3 to :/usr/recordings/3e/1555141317-2349577.mp3<br>Saved the url: http://example.com/b.mp3 to :/usr/recordings
,因此格式化在控制檯中很難讀取。有沒有辦法調整自己的打印有這樣
Saved the url: http://example.com/a.mp3 to :/usr/recordings/3e/1555141317-dadfdasffa.mp3
Saved the url: http://example.com/b.mp3 to :/usr/recordings/3c/1555141317-fddfd.mp3
Saved the url: http://example.com/c.mp3 to :/usr/recordings/3f/1555141317-ffdfd.mp3
現在只需更換'\ N'爲'PHP_EOL'和我給予好評 – Gordon 2010-08-20 17:22:07
呵呵。滿意? :) – 2010-08-20 17:22:53
如果您不介意輸出中的BR,您可以隨時執行這兩種操作 - 「
\ n' – Jenni 2010-08-20 17:38:18