I'd use preg_match().
Something like should do the trick:
if ($file != ".htaccess" && $file != "." && $file != ".." &&
!preg_match("/(.*)\.php/i", $file))
Niklas
-----Original Message-----
From: --- [mailto:[EMAIL PROTECTED]]
Sent: 14. syyskuuta 2001 11:09
To: [EMAIL PROTECTED]
Subject: [PHP] R: File Uploads
you can use strrchr to find the extension, like this:
if ($file != ".htaccess" && $file != "." && $file != ".." &&
strrchr($file,".") != ".php")
Try to see php manual, probably i mispelled it.
----------------------
Federico
[EMAIL PROTECTED]
----------------------
Christopher Cm Allen <[EMAIL PROTECTED]> wrote in message
008d01c13c6c$3a41a640$[EMAIL PROTECTED]
Greetings:
Looking for a way to say *.php in this code:
if ($file != ".htaccess" && $file != "." && $file != ".." && $file != ANY
PHP FILE)
I have tried *.php...
Any Ideas?
Thanks
CCMA
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]