Jump to content

Read Files Inside a Folder thats Inside of Another Folder


N402KC

Recommended Posts

Hi Guys,

 

I have  a Main folder called Templates. Inside of templates, I have a few hundred folders. Inside of all those folders is a file called screenshot.png. Can someone help me with my code. So far i have it echo'ing all of the folder names, But I need it to get into those folders, find screenshot.png, and show it kinda like a gallery. Please let me know if you can help. Thanks

 

<?php 
  $current_dir = "templates/";    
  $dir = opendir($current_dir);       
  
  echo ("<p><h1>List of available files:</h1></p><hr><br />"); 
  while ($file = readdir($dir))           
    {
        echo $file;
    }       
?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.