开发者

How slow is is_readable()?

Is it ok if I use it to check if some file exist, like 10-15 css/js/php fil开发者_运维百科es? This would be done on each page load.

How much would it slow it down?


assuming that it is local file (and not nfs mount), it won't slow anything down, and it may be even faster then issuing request to a file that is not readable. Also, is_readable caches the results (you cave to call clearstatcache if you want to dismiss the cached results). Sure, the best way to check is to profile your page after adding the is_readable call, but I bet it won't make any difference

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜