wildcards
| From: | Symeon Charalabides | Date: | Sun, 20 Jan 2002 17:46:33 +0000 |
| Subject: | wildcards | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-11531@lists.php.net to get a copy of this message | ||
I must be missing something here...
I've got these 3 lines of code:
if (file_exists('dir/'.$filename.'.gif'))
unlink('dir/'.$filename.'.gif');
if (file_exists('dir/'.$filename.'.jpg'))
unlink('dir/'.$filename.'.jpg');
if (file_exists('dir/'.$filename.'.png'))
unlink('dir/'.$filename.'.png');
...and I'm sure they can be turned into one using some kind of wildcard, only I
can't figure out how. In fact, I don't mind erasing files of a certain filename
with ANY extension at all. I just know, in this case, that it can only be one of
those three.
Any advice, people?
Symeon Charalabides (cosmopolitan trainee)
------------------------------------------
http://www.webmate.gr