Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Show all images from folder

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #156513
    Junni
    Participant

    am trying to display all images from a folder, but it is only showing JPEG images not png

    if(isset($_POST['submit'])){
    
            $nameof = $_POST['searchid'];
            $dirname = $nameof."/";
    
    
            $files = glob( $dirname."*.*");
    
            for ($i=1; $i<count($files); $i++)
    
            {
    
            $image = $files[$i];
    
    
            echo '<img width="250" class="all-seletc-wrap" src="'.$image .'" alt="Random image" />'."<br /><br />";
            }
        }
    
    #156517
    Junni
    Participant
    foreach (glob($dirname."*.*") as $image) {
                echo '<img width="250" class="all-seletc-wrap" src="'.$image .'"alt="Random image" />'."<br /><br />";
                }
    

    solution , thanx for help;

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.