Posted by pangea33 on 12/04/06 04:19
Michael Fesser wrote:
> .oO(bill)
>
> >I have a directory into which I upload pictures. I know the
> >entire file name other than the extension.
> >
> >file_exists will return true when I give it a wildcard extension,
> >but I can't figure out the best way to determine the extension
> >for fopen.
>
> http://www.php.net/glob
>
> Micha
Not so sure that I agree using a function in an application, that
communicates with the OS via a webserver, is a better choice than
something native to the operating system, but this solution will
definitely work. Probably easier to handle the result set too.
[Back to original message]
|