Jump to content

scandir() only returns 1 file


dstars5

Recommended Posts

Hey guys,

 

I have been trying to figure out how to get all files in a folder into a PHP table.. However, when I use:

 



<?php
print_r(scandir($dir));
?>


 

The array only has the first file in the directory.

 

I have noticed, however, that one out of the 6 folders I have tried with this actually worked.  The array contained every file inside.  I have no idea why it works on this one though.  

 

Can anyone help me out?  

Link to comment
https://forums.phpfreaks.com/topic/279087-scandir-only-returns-1-file/
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.