PHP如何检测网络文件是否存在?
- 内容介绍
- 文章标签
- 相关推荐
本文共计42个文字,预计阅读时间需要1分钟。
php
[PHP]代码
$file = "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."; }
本文共计42个文字,预计阅读时间需要1分钟。
php
[PHP]代码
$file = "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."; }

