Re: Problem writting to file...

From: Date: Fri, 06 Jul 2001 18:46:28 +0000
Subject: Re: Problem writting to file...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56552@lists.php.net to get a copy of this message
When I use that code I get the following... Counter is = 0 Counter is = 1 Counter is = 2 Counter is = 3 Counter is = 4 Counter is = 5 However if you remove the "Counter is =" part then once again no numbers are written, only the 'new line' symbols... ----- Original Message ----- From: Chadwick, Russell To: 'php-general@lists.php.net' Sent: Friday, July 06, 2001 7:43 PM Subject: RE: [PHP] Problem writting to file... What happens when the code is <?php error_reporting(15); $fp = fopen("./data.txt", "w+"); $counter = 0; while ($counter <6) { fwrite($fp, "Counter is = " . $counter . "\n"); $counter = $counter +1; } fclose ($fp); ?> ----- Original Message ----- From: "James Bartlett" <zotud@btinternet.com> To: <php-general@lists.php.net> Sent: Friday, July 06, 2001 1:15 PM Subject: [PHP] Problem writting to file... Hi, I'm trying to write data to a file but for some reason it will not store numbers in the file...Here's the code I'm using...(as an example) <?php $fp = fopen("./data.txt", "w+"); $counter = 0; while ($counter <6) { fwrite($fp, $counter . "\n"); $counter = $counter +1; } fclose ($fp); ?> Thanks for any help... James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#56552) next »