J'ai un script php que j'exécuter via la ligne de commande commeImpression mieux formattage en ligne de commande
php file.php
et dans ce fichier j'ai une déclaration d'impression comme
print "<br>Saved the url: {$url} to :{$destination}";
Je supposais le br serait former-1 sous l'autre mais quand je cours le script j'obtiens ce format qui est vraiment difficile à lire
<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
donc le formatage est vraiment difficile à lire dans la console. Est-il un moyen de restructurer mon impression d'avoir la sortie comme celui-ci
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
maintenant juste remplacer '\' n' pour PHP_EOL' et j'upvote – Gordon
hehe. satisfait? :) –
vous pouvez toujours faire les deux si vous ne dérange pas les BR dans votre sortie- '
\ n' – Jenni