note 16090 deleted from function.stristr by didou

From: Date: Thu, 17 Jun 2004 16:15:32 +0000
Subject: note 16090 deleted from function.stristr by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71234@lists.php.net to get a copy of this message
Note Submitter: k100@k100design.com ---- [Editor's note: blaster at jazz4ever dot tk tells us that it's bad to use this check for the extension since double extensions can be used (eg file.jpg.vbs which could be a virus)] i used this function to scan a directory searching for images: $eleimg=opendir("../$dir"); while ($file=readdir($eleimg)) { if (stristr($file,".jpg") || stristr($file,".gif")) { echo "<option value='$file'>$file\n"; } }

« previous php.notes (#71234) next »