Re: [PHP] write to file question, rewritten

2005-06-01 Thread Mark Cain
Here is a function I use to write data to a file (It is similar to PHP 5's file_put_contents but works for those who don't have a PHP 5 installation:) function file_put_contents($filename, $data, $file_append = false) { $fp = fopen($filename, (!$file_append ? 'w+' : 'a+')); if(!$fp) { trig

Re: [PHP] Write to file?

2002-01-25 Thread Nick Wilson
* and then MÃ¥rten Andersson blurted > I want to write to a textfile, but I want a row for each string I write > to the file. > As it is now when I write to the file it just starts writing where the > last string ends.. > > What should I do? =) Have you tried \n at the end of your string? -