我有我通过命令行运行像打印更好的格式化
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