Re: fwrite/fclose troubles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please keep replies on-list so everyone can benefit from the discussion.

On 20 Mar 2008, at 00:13, Mark Weaver wrote:
Stut wrote:
RTFM. The fopen function (http://php.net/fopen) will return a stream resource. The fwrite (http://php.net/fwrite) and fclose (http://php.net/fclose - noticing a pattern here?) take that resource as the first parameter. You're passing the filename to those functions, which as the error messages clearly state is not a valid stream resource. Please RTFM carefully before asking here, it'll help save both our sanity and yours!

WEll thank stut for the sage advise. However, I "had" Read The Fuckin Manual and clearly had missed the part you so curtly put forth which is why I asked about it. Geez! I think I'll go back to lurking for pete's sake. Having a bad day?

I've had a great day, thanks for asking. Bit depressed to find out that Arthur C. Clarke died last night but apart from that it's been extremely productive.

Now, "thank stut" - is that like "thank god"? If so please don't do that, I'm pretty sure I'd be a huge disappointment as a deity.

Maybe it's just me but the signature of a function you're using is a pretty fundamental part of the manual to have "missed". I kinda meant it when I said "carefully". It's also a bit strange to have "missed" it the second and third times you read the relevant parts of the manual in your attempt to work out what was causing the error message. You did that too right?

Incidentally, I hope you remove or disable that code before going into production. Multiple processes/threads trying to append to the same file is never a good idea.

I help people in my own sarcastic way. If you've been lurking on the list for a while you might have noticed that. If not then it's possible I've mellowed a bit as the years have passed, but I doubt it. If you don't like it you are free to ignore me - I try not to force my advice on anyone, that would be offensive.

Now you have a great day, mine's over! But never fear, a whole new day with brand new possibilities for sarcasm and snide remarks starts in a few short hours. For now, that's all folks!

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux