时间:2021-07-01 10:21:17 帮助过:5人阅读
$arr = array('1.jpg','2.jpg','3.jpg');
$notexists = array();
foreach($arr as $k=>$v){
if(!file_exists($v)){
$notexists[] = $v;
}
}
print_r($notexists);
?>
$folder = '/home/fdipzone/xxx/'; // 指定的文件夹
$arr = array('1.jpg','2.jpg','3.jpg');
$notexists = array();
foreach($arr as $k=>$v){
if(!file_exists($folder.$v)){
$notexists[] = $v;
}
}
print_r($notexists);
?>