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
Post a Comment