I want to check multiple files at once if they exist or not. I want to show a text if any of these files exists:
$filepre = ''.$br.'/filethumb/'.$name.'.jpg';
$filess = ''.$br.'/ss/'.$name.'.jpg';
$filess1 = ''.$br.'/ss/'.$name.'1.jpg';
$filess2 = ''.$br.'/ss/'.$name.'2.jpg';
$filess3 = ''.$br.'/ss/'.$name.'3.jpg';
$filess4 = ''.$br.'/ss/'.$name.'4.jpg';
$filess5 = ''.$br.'/ss/'.$name.'5.jpg';
$filess6 = ''.$br.'/ss/'.$name.'6.jpg';
$filess7 = ''.$br.'/ss/'.$name.'7.jpg';
$filess8 = ''.$br.'/ss/'.$name.'8.jpg';
$filess9 = ''.$br.'/ss/'.$name.'9.jpg';
Then I want to check if any of these files exist or not. If 1 of these 10 files exists then show a text "Screenshots:". If no file exists then nothing will be shown.
I tried:
if (file_exists($filess or $filess1 or $filess2 or $filess3 or $filess4 or $filess5 or $filess6 or $filess7 or $filess8 or $filess9)){
echo 'Screenshots';
}
Did I do anything wrong that it's not working?