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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to