Page 1 of 1

This if isn't working as expected

Posted: Mon May 28, 2007 11:42 am
by toasty2

Code: Select all

if(!file_exists('content/'.$name.'.txt') and $name!='header' and $name!='footer' and $name!='navbar' and $name!='nav' and $name!='' and !strpos('..',$name)))
Edit: The only problem seems to be that the !strpos('..',$name) is not working.

Posted: Mon May 28, 2007 12:36 pm
by volka
http://de3.php.net/function.strpos wrote:strpos ( string $haystack, mixed $needle
try strpos($name, '..')