php - Boolean OR in condition - what's wrong? -


here's condition -

if ($file !== "." || $file !== "..") 

not working.

if (($file !== ".") || ($file !== "..")) 

not working either.

if ($file !== ".") 

works fine. ' drives me edgy. i've read php.net has offer on logical operators (http://php.net/manual/en/language.operators.logical.php), bunch of crappy tutorials googled up, , triple-checked operator precedence. points, either of ways should work.

what reason?

$file should not . , should not ..

if ($file !== "." && $file !== "..")


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -