运行我的脚本时,我收到几个这样的错误:
警告:不能更改头信息-头已经发出(输出开始/some/file.php:12)在/some/file.php上线23
错误消息中提到的行包含header()和setcookie()调用.
这可能是什么原因?以及如何解决它?
我想在Linux上用grep搜索包含dos行结尾的文件.像这样的东西:
grep -IUr --color '\r\n' .
Run Code Online (Sandbox Code Playgroud)
以上似乎与文字rn相匹配,这不是所期望的.
这个输出将通过xargs传输到todos,将crlf转换为lf,就像这样
grep -IUrl --color '^M' . | xargs -ifile fromdos 'file'
Run Code Online (Sandbox Code Playgroud)