17488 Posts in 4473 Topics by 1978 members
|Go to End|
13 September 2008 at 12:12am
I have a problem. I need to read the files that are allocated into a folder in assets/Uploads/Event/.
Well, i dont know how i get the list of files that are in this folder, and i need the list of files that are in the sub-folders.
Thanks for your help!
13 September 2008 at 1:59am
I made this
if ($dh = @opendir($dir))
while (($file = @readdir($dh)) !== false)
$lista.="Archivo: $file : ExtensiÃƒÂ³n: " . filetype($dir . $file) . "<br>";
but the dir must be start with /var/www/mysite/assets/Uploads/folder/
13 September 2008 at 2:05am
You can use internal SS DataObject functions for this as well... ...
That would look something like this :
$left_dir = DataObject::get_one("Folder", "Name = \"directoryname\"");
$all_files = DataObject::get("File","ParentID = $left_dir->ID");
|Go to Top|