PHP判断网络文件是否存在
![](//m.sbmmt.com/m/static/front/mobimages/moren/moren.png)
- 原创
- 2016-07-25 08:42:10856浏览
[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
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。