abhilashdas Posted September 24, 2006 Share Posted September 24, 2006 Can anybody tell me how to list files of a specified file types from a directory??? Link to comment https://forums.phpfreaks.com/topic/21834-directory-listing/ Share on other sites More sharing options...
extrovertive Posted September 24, 2006 Share Posted September 24, 2006 opendirreaddir Link to comment https://forums.phpfreaks.com/topic/21834-directory-listing/#findComment-97532 Share on other sites More sharing options...
ronverdonk Posted September 24, 2006 Share Posted September 24, 2006 Try this:[code]<?php//// An example if you want all of a specific file type in a directory. //$Gdir = "fotos/";foreach (glob("$Gdir/{*.jpg,*.png,*.gif}", GLOB_BRACE) as $file) echo $file.'<br>';?>[/code]Ronald 8) Link to comment https://forums.phpfreaks.com/topic/21834-directory-listing/#findComment-97631 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.