我有以下的測試腳本:線打破PHP
<?php
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "Floppy Jalopy\n";
fwrite($fh, $stringData);
$stringData = "Pointy Pinto\n";
fwrite($fh, $stringData);
fclose($fh);
?>
然而,當運行並打開usign記事本,數據在一行返回而不中斷的情況爲:
軟盤老爺車(瘋狂的盒子)尖尖 託(瘋狂的盒子)
這裏我不能找到「瘋狂的盒子」,但它的一個適當的字符真的很瘋狂的盒子。是什麼賦予了!
如果你在寫字板中打開它,它會應付'\ n'或'\ r \ n',就像許多其他編輯器一樣,但記事本很挑剔。 – Spudley 2010-11-16 16:00:16