Re: What may be wrong with ereg...
| From: | Daniel Convissor | Date: | Thu, 14 Dec 2000 15:24:04 +0000 |
| Subject: | Re: What may be wrong with ereg... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30297@lists.php.net to get a copy of this message | ||
Sylwester
> My ereg expression is:
> ereg ( "/|\.\./|\\/", $HTTP_POST_FILES [ "filename" ] [ "name" ]
> )
What are you trying to do? Any answer given at this point is pure
speculation. That regular expression looks bad, that's for sure. Also, what
you have there looks more like an expression for preg as opposed to ereg.
What that expression you wrote does is return true if the file name evaluated
contains any of the following character combinations:
/
../
\/
Is that what you want? I doubt it.
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