Martin Zvarík wrote:
$i = 0;
$r = file_put_contents('file.txt', 'content');
} while($r === false && $i < 3);
if ($r === false) die('error');
Makes sense? or is it enough to do it just once?
You call file_put_contents() once.
it writes an entire file when called.
use fopen/fwrite/fclose to do it line by line.
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php