Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronizing file access in PHP

Status
Not open for further replies.

DPisarev

Programmer
Dec 12, 2002
29
CA
Hi,

I know PHP and Perl are not the same thing, but unfortunately there is no dedicated PHP forum, so I came here.

My question is: how do I make sure that my PHP script accesses a flat file in a synchronized fashion, that is, how can I make sure the flat file is not being edited by two invocations of the script at once?

Thanks,
Dmitri.
 
Dunno about php, but in Perl you'd lock the file using flock

--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top