Re: How to act on many files (i.e. *)
| From: | Ken | Date: | Fri, 24 Aug 2001 19:10:33 +0000 |
| Subject: | Re: How to act on many files (i.e. *) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64311@lists.php.net to get a copy of this message | ||
I got my answer: Use directory functions, not filesystem functions:
http://www.php.net/manual/en/ref.dir.php
- Ken
kenzo@free-music.com
At 02:51 PM 8/24/01 -0400, Ken wrote:
>I can't find a way in PHP to behave on multiple files, without knowing the script somehow
>knowing the filenames already.
>
>In particular, I want to delete all files in a directory. unlink("*") doesn't
>seem to work with wildcards (at least not on my test Windows environment).
>
>I can't find any function that gets me a list of filenames, either.
>
>Am I missing something, or do I have to shell out to do this?
>
>- Ken
>kenzo@free-music.com