当我尝试在PHP中使用fwrite用\ r \ n编写文件时,它可以在Notepad ++中工作,但是当我尝试在Notepad中查看文件时,它没有检测到新行。这是我的代码。
$log = "[".date_format($date,'Y/m/d')."-".$sampleVariable."]".$sampleVariable."/".$terminal."/".
$sampleVariable."/".$result."/".$sampleVariable;
fwrite($filepointer, $log."\r\n");
我也尝试过PHP_EOL,但是还是一样。