Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
考虑:
exec("php gmail-smtp.php >> basic-email-template/debug-mailer.log");
我想记录文件消息以从新行开始。但我找不到有关 Bash 管道的相关信息。
我不能按照你的方式给你正确的答案,但只要这样做:
file_put_contents('basic-email-template/debug-mailer.log', "\n", FILE_APPEND)
问题可能出在您的日志文件中。即,您使用>>正确。
>>
结果文件中的单行可能是因为您的记录器gmail-smtp.php正在将日志条目写为单行(没有换行符)。先检查一下。
gmail-smtp.php