PHP判断网络文件是否存在
<无详细内容>
$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."; }
- 上一篇:一个PHP分页代码,函数形式,返回起始页
- 下一篇:一个基于PHP的事件机制
精彩图集
精彩文章