$f = fopen("e:/datefile.txt", "w") or die("Error open file!");
$txt = "PHP\r\n";
fwrite($f, $txt);
$txt = "Programming\r\n";
fwrite($f, $txt);
$txt = "For Web Applications";
fwrite($f, $txt);
fclose($f);
/*
run:
PHP
Programming
For Web Applications
*/