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
精彩评论