note 31127 added to function.eregi

From: Date: Thu, 10 Apr 2003 15:22:50 +0000
Subject: note 31127 added to function.eregi
Groups: php.notes 
Request: Send a blank email to php-notes+get-46453@lists.php.net to get a copy of this message
why not match some filenames? if (!ereg("^[a-ZA-Z0-9]+[/.gif|/.jpg|/.png]$",$match){ echo "Invalid Filename"; }else{ if (file_exists($match)){ echo "blah"; } } I suppose that would work off the top of my head but I have yet to test it, so you may want to check it first. -- http://www.php.net/manual/en/function.eregi.php http://master.php.net/manage/user-notes.php?action=edit+31127 http://master.php.net/manage/user-notes.php?action=delete+31127 http://master.php.net/manage/user-notes.php?action=reject+31127

« previous php.notes (#46453) next »