【发布时间】:2011-05-10 21:45:36
【问题描述】:
我有以下测试脚本:
<?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 Notepad 时,数据在一行中返回,没有中断:
Floppy Jalopy(crazy box)Pointy Pinto(疯狂的盒子)
我找不到适合“疯狂盒子”的角色,但它是一个非常疯狂的盒子。什么给了!
【问题讨论】:
标签: php fopen text-files fwrite