![]() |
Strange fopen Problem
I'd like to know why I'm getting the following error:
Quote:
:
Quote:
:
|
Re: Strange fopen Problem
With the second code you tell it to do a write to the file
:
fwrite($h1, 'bar');If you are trying to get it to add more text in to the file try: :
$h1=fopen($filename, 'a'); |
Re: Strange fopen Problem
I'm not attempting to add more. I'm attempting to read that which has already been written.
|
Re: Strange fopen Problem
then your code should be:
:
|
Re: Strange fopen Problem
In the first one your are getting the file size before you open the file again, in the second you open the file for reading before you get the file size. I suspect there that the write isn't being flushed to disk until a different IO is performed, so the file's size on disk doesn't match what you think it does.
|
| All times are GMT -5. The time now is 4:19 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC