[clue-tech] I'm blind, or why is this PHP fwrite() failing?
Jed S. Baer
thag at frii.com
Mon Sep 26 17:34:48 MDT 2005
On Mon, 26 Sep 2005 16:37:50 -0600
David L. Anselmi wrote:
> The correct way is:
>
> > $ptologfile = fopen('/tmp/contactlog.txt', 'a') or die ("Can't open
> > logfile");
>
> because or is lower precedence than =.
Yeah, but it's also the case that || isn't a logical or, where you'd
expect short-circuiting logic to apply. It's a bitwise or, so regardless
of the boolean status of $ptologfile, || will cause the die to execute, so
it's status can be or'd with $ptologfile. Or something close to that. I
have to go re-read the operators page. Obviously.
Thanks,
jed
--
http://s88369986.onlinehome.us/freedomsight/
Key fingerprint = B027 FEFB 4281 CC72 67D1 4237 F2D0 D356 077A A30E
... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier
_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech
More information about the clue-tech
mailing list