PHP output to a textfile
Posted: Sat Jun 13, 2009 11:48 am
How do I make the content of 'data.txt'
1
23
i.e on two lines NOT on one line as 123?
(see php script below write the out)
I am on Windows VISTA, running a WAMP server.
<?php
$fp = fopen('data.txt', 'w');
fwrite($fp, '1');
fwrite($fp, '23');
fclose($fp);
// the content of 'data.txt' is now 123 and not 23!
?>
1
23
i.e on two lines NOT on one line as 123?
(see php script below write the out)
I am on Windows VISTA, running a WAMP server.
<?php
$fp = fopen('data.txt', 'w');
fwrite($fp, '1');
fwrite($fp, '23');
fclose($fp);
// the content of 'data.txt' is now 123 and not 23!
?>