开发者

Does php Include lock a file?

开发者 https://www.devze.com 2023-03-30 20:52 出处:网络
I am using the include function to insert the contents of a text file into my webpage. Something like:

I am using the include function to insert the contents of a text file into my webpage.

Something like:

include ("mytextfile.txt");

That works ok when I test it but what happens when yo开发者_StackOverflow中文版u have simultaneous access requests? Can each webpage access the file and its contents or is there some locking that will prevent that?

If there is locking going on, how can I allow multiple read accesses to a text file?

Thanks


There's no locking. Each page that has an include simply parses the file defined in the include. No need to lock since it's read-only.

0

精彩评论

暂无评论...
验证码 换一张
取 消