Jump to content

open dir to list contents


Lassie

Recommended Posts

I am retieving the contents of a dir for a download.
$hash holds the folder
The code is
[code]
//open the dir
$folder= opendir('C:pick_up/$hash');
//initialise an array to store the contents
$files = array();
//loop through the directory
while(false !==($item = readdir($folder)))
{
$files[] = $item;
}
closedir($folder);
echo '<pre>';
print_r ($files);
echo '</pre>';
[/code]
I dont get any output and my debugger goes into a never ending loop.
How can I debug this?
Link to comment
https://forums.phpfreaks.com/topic/34443-open-dir-to-list-contents/
Share on other sites

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.