I am looking for a way to search a file knowing the beginig of his name. For exemple, I know that the file I am looking for is:
montreal_000013_120.jpg
But I just know:
montreal_000013
And I can't know _120.jpg
So at this time I did this: $dirthumbs = $dir."/thumbs" ; $direc_src_obj2 = dir($dirthumbs) ; while($entry=$direc_src_obj2->read()) { if( substr($entry, 0, 15) == "$begining"){ $return[$i]["thumb"] = "$entry" ; break ; } } It works but it's not enough fast :-(
For resume, is there a way to do something like that:
ls montreal_000013*
without using the passthru function, I am looking for a native php function doing ls $mychar*
Thanks, Vincent.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php