开发者

Does php Include lock a file?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜