Re: [PHP] Problem writting to file...

2001-07-06 Thread Chris Anderson

I don't see anything wrong with the code. Does this work:
?php
$fp = fopen(./data.txt, w+);
$counter = 0;
for($counter = 0; $counter 6; $counter++)
{
fwrite($fp, $counter . \n);
}
fclose ($fp);
?

- Original Message -
From: James Bartlett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 06, 2001 2: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]




Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett

nope...

The 'new line' tages are printed inside the file but not the values produced by the 
counter... 
  - Original Message - 
  From: Chris Anderson 
  To: James Bartlett ; [EMAIL PROTECTED] 
  Sent: Friday, July 06, 2001 7:25 PM
  Subject: Re: [PHP] Problem writting to file...


  I don't see anything wrong with the code. Does this work:
  ?php
  $fp = fopen(./data.txt, w+);
  $counter = 0;
  for($counter = 0; $counter 6; $counter++)
  {
  fwrite($fp, $counter . \n);
  }
  fclose ($fp);
  ?

  - Original Message -
  From: James Bartlett [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, July 06, 2001 2: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





Re: [PHP] Problem writting to file...

2001-07-06 Thread Tyler Longren

Any errors being given to you?

Tyler

- 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]




Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett

No errors at all...
  - Original Message - 
  From: Tyler Longren 
  To: php-general ; James Bartlett 
  Sent: Friday, July 06, 2001 7:29 PM
  Subject: Re: [PHP] Problem writting to file...


  Any errors being given to you?

  Tyler

  - 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





RE: [PHP] Problem writting to file...

2001-07-06 Thread Chadwick, Russell


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]




RE: [PHP] Problem writting to file...

2001-07-06 Thread Jerry Lake

try this

?php
$fp = fopen(./data.txt, w+);
$counter = 0;
while ($counter  6)
{
$counter++;
fwrite($fp, $counter . \n);
} 
fclose ($fp);
?

Jerry Lake
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


-Original Message-
From: James Bartlett [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem writting to file...


No errors at all...
  - Original Message - 
  From: Tyler Longren 
  To: php-general ; James Bartlett 
  Sent: Friday, July 06, 2001 7:29 PM
  Subject: Re: [PHP] Problem writting to file...


  Any errors being given to you?

  Tyler

  - 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]




Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett

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: '[EMAIL PROTECTED]' 
  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 [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]




Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett

I get the same result...
  - Original Message - 
  From: Jerry Lake 
  To: [EMAIL PROTECTED] 
  Sent: Friday, July 06, 2001 7:48 PM
  Subject: RE: [PHP] Problem writting to file...


  try this

  ?php
  $fp = fopen(./data.txt, w+);
  $counter = 0;
  while ($counter  6)
  {
  $counter++;
  fwrite($fp, $counter . \n);
  } 
  fclose ($fp);
  ?

  Jerry Lake
  Interface Engineering Technician
  Europa Communications - http://www.europa.com
  Pacifier Online - http://www.pacifier.com


  -Original Message-
  From: James Bartlett [mailto:[EMAIL PROTECTED]]
  Sent: Friday, July 06, 2001 11:30 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] Problem writting to file...


  No errors at all...
- Original Message - 
From: Tyler Longren 
To: php-general ; James Bartlett 
Sent: Friday, July 06, 2001 7:29 PM
Subject: Re: [PHP] Problem writting to file...


Any errors being given to you?

Tyler

- 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]




RE: [PHP] Problem writting to file...

2001-07-06 Thread Chadwick, Russell


Oooo, then make it 
fwrite($fp, $counter\n);

-Original Message-
From: James Bartlett [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 11:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem writting to file...


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: '[EMAIL PROTECTED]' 
  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 [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]


-- 
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]




Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett

It doesnt like that either...
  - Original Message - 
  From: Chadwick, Russell 
  To: '[EMAIL PROTECTED]' 
  Sent: Friday, July 06, 2001 7:51 PM
  Subject: RE: [PHP] Problem writting to file...



  Oooo, then make it 
  fwrite($fp, $counter\n);

  -Original Message-
  From: James Bartlett [mailto:[EMAIL PROTECTED]]
  Sent: Friday, July 06, 2001 11:46 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] Problem writting to file...


  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: '[EMAIL PROTECTED]' 
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 [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]


  -- 
  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]




Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett

No luck there...
  - Original Message - 
  From: Brad S. Jackson 
  To: James Bartlett 
  Sent: Friday, July 06, 2001 8:01 PM
  Subject: Re: [PHP] Problem writting to file...




  Sometimes you have to do this to make it work.

  fwrite($fp, strval($counter) . \n);


  James Bartlett [EMAIL PROTECTED] wrote:
  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





Re: [PHP] Problem writting to file...

2001-07-06 Thread John Meyer


   James Bartlett [EMAIL PROTECTED] wrote:
   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);
   ?

Is it writing anything out?
-- 
John Meyer
Programmer
[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]




RE: [PHP] Problem writting to file...

2001-07-06 Thread Don Read


On 06-Jul-01 James Bartlett wrote:
 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+);

if ($fp) {   // always, always ! test a fopen() 

 
 $counter = 0;
 while ($counter 6)
 {
 fwrite($fp, $counter . \n);

//  uhmmm... that's binary 0-5 i.e (^A-^E) izzat what you want ?
// then why the \n ?

try fwrite($fp, $counter\n);

if (! fwrite(  )) {   // and shurre, you always have enuf disk space 
   ... 
}

 $counter = $counter +1; 
 } 
 fclose ($fp);

 } else {
echo Bcouldn't open file/B;
 }

 ?
 
 Thanks for any help...
 
 James

-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
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]