Mike Willbanks wrote:
<snip>
As you said functions are only fopen. Although there is
file_get_contents that is exactly like fopen except that it reads all of
the file contents into a variable.
Mike
file_get_contents() as many other file functions I did not mention but
are handy, but do not seem to have any way to perform file locking. I am
trying to understand if this is so or do the functions do it internally
hidden from the user? Files accessed even just for reading in a
multitasking or network environment (like the internet) should employ
some type of file lock to prevent corruption if it is being written to
at the same time as it is being access by another instance. Books,
tutorials, and examples seem to ignore this. Is the only really correct
way is via file() where you have a file handle to specially call
flock()? That is my question.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com