PHP判断网络文件是否存在

2016-01-22 0 810
PHP判断网络文件是否存在

[PHP]代码

$file = "http://www.xxx.nxxxet/demo/file_exists.zip";
$fileExists = @file_get_contents($file,null,null,-1,1) ? true : false ;

if($fileExists){
     echo "File Exists!";
}else{
     echo "Sorry, we couldn't find the file.";
}

遇见资源网 php PHP判断网络文件是否存在 http://www.ox520.com/8156.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务