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??? Quote Link to comment Share on other sites More sharing options...
extrovertive Posted September 24, 2006 Share Posted September 24, 2006 opendirreaddir Quote Link to comment 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) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.