What do you mean when you say that it "doesn't seem to work"? Are you checking the return value from open? Have you tested the script from the command line? Are you sure the current working directory is what you think it is when the script is run from the web?
Anyway, it sounds like you need to use file locking. Opening for read/write won't prevent two instances of the script from doing conflicting writes. See flock and Fcntl.
In reply to Re: FreeBSD reading/writing workaround?
by chipmunk
in thread FreeBSD reading/writing workaround?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |