I use this code to preview my images from directory to web page:
<?php
$username3 = $_SESSION['username3'];
$username1 = $_SESSION['username1'];
$images2 = glob("web/user/$username3/profile/profile-"."$username1-*.
{jpg,jpeg,gif,png}",GLOB_BRACE);
$_SESSION['images2']=$images2;
if(!empty($images2)){
foreach($images2 as $image2) {
echo '<img src="'.$image2.'"/>';}}
else{
echo '<img src="web/images/user.png">';
}
?>
this code work fine in pc and all android device but when I tested in several iphones, pictures doesn't show and the user.png show instead. I don't know what is wrong with this code or what should I do. path is wrong or something else?