我正在尝试使用过滤器,以查看文件是否存在,以及有多少:我正在尝试使用以下内容来获取脚本:
$list = glob($filepath.$filenamePartial'*'.$ext);
var_dump($list);
解决1:
$list = glob($filepath.$FsisName.'_'.$count.'_'.'*'.$ext);
if (count($list) <= 0){
$FFileUPL = $filepath.$FsisName.'_'.$count.'_'.$FileDate.'.'.$ext;
$event = move_uploaded_file($flTName, $FFileUPL);
}else{
echo 'this file Exist: '.$FsisName.'-'.$count.'-'.$FileDate.'.'.$ext.'<br>';
$event = false;
}
如何在iteratos中检索名称文件? 解决2:
foreach($list as $fnames){
$eFile['smg'] .= basename($fnames).'<br>';
}
答案 0 :(得分:0)
解决:
$list = glob($filepath.$FsisName.'_'.$count.'_'.'*'.$ext);
if (count($list) <= 0){
$FFileUPL = $filepath.$FsisName.'_'.$count.'_'.$FileDate.'.'.$ext;
$event = move_uploaded_file($flTName, $FFileUPL);
}else{
echo 'this file Exist: '.$FsisName.'-'.$count.'-'.$FileDate.'.'.$ext.'<br>';
$event = false;
}
foreach($list as $fnames){
$eFile['smg'] .= basename($fnames).'<br>';
}