龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

PHP判断网络文件是否存在

时间:2014-07-22 14:52来源: 作者: 点击:
分享到:
<无详细内容>
$file = "http://www.oschina.net/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.";
}
精彩图集

赞助商链接