prototype18 Posted September 17, 2010 Share Posted September 17, 2010 Okay, I have a problem. I need to display multilple output of a file with a similar file name I.E. file1: 6002010.pdf file2: 6002010.mmddyyyy.pdf Now the first part of the file stays the same, but there is a time stamp on modified versions of the file. But in my output I need to display all the files with the 6002010. Could I use a wildcard such as 6002010* to get all the files to output on the screen? Or do I need to use a regular expression? Link to comment https://forums.phpfreaks.com/topic/213691-need-help-with-php-wildcards-or-regular-expressions/ Share on other sites More sharing options...
prototype18 Posted September 17, 2010 Author Share Posted September 17, 2010 Is GLOB what PHP programmers use for this situation? Link to comment https://forums.phpfreaks.com/topic/213691-need-help-with-php-wildcards-or-regular-expressions/#findComment-1112251 Share on other sites More sharing options...
Pikachu2000 Posted September 17, 2010 Share Posted September 17, 2010 If all you need to do is list the files, this should work on most *nix systems. </php echo '<pre>'; echo `ls 6002010*`; // add the path to the directory echo </pre>; ?> Link to comment https://forums.phpfreaks.com/topic/213691-need-help-with-php-wildcards-or-regular-expressions/#findComment-1112274 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.