您好,欢迎访问一九零五行业门户网

file_exists一直不存在

用is_file也不存在
$path = http://localhost/images_951234567/1372.jpg;
if(is_file($path)){
echo 存在;
}else{
echo 不存在;
}
一直显示不存在
我在浏览器上打这个地址,图片就出来了
另外说一下,我伪静态了地址
肿么办~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
回复讨论(解决方案) 不存在,肯定就是地址有错误了
file_exists 和 is_file 应该是不能用于url文件
如果仅仅是检测图片是否存在,则可以这样写:
 $url=@getimagesize($path);
if(!is_array($url))
{
     echo ' the image doesn\'t exist';
}
else {
     echo ' the image exists';
}
检查所有类型文件的话可以用curl
...
恭喜你答对了!
其它类似信息

推荐信息