Re: What may be wrong with ereg...
| From: | Daniel Convissor | Date: | Fri, 15 Dec 2000 00:05:52 +0000 |
| Subject: | Re: What may be wrong with ereg... | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30406@lists.php.net to get a copy of this message | ||
Hey Sylwester:
> > What that expression you wrote does is return true if the file
> > name evaluated contains any of the following character combinations:
> > /
> > ../
> > \/
> ^
> Sorry, no slash here.
This works for me...
ereg ( "../|[/\]", $HTTP_POST_FILES [ "filename" ] [ "name" ] )
There are probably other ways to do it too...
Enjoy,
--Dan
--
PHP scripts that make your job easier
http://www.analysisandsolutions.com/code/
SQL Solution | Layout Solution | Form Solution
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409