'Want use 'or' operator whit file_exists php
I want to use or operator in php file_exists() function. I have files whichone name admin_blablabla.php and i also have files withoutadmin 'tag'. I don't use any php framework etc. Does any idea why don't work it?
$page0 is got from $_GET["page"] (f.e: ...index.php?lang=en&page=add_user)
if ((!file_exists("engine/pages/" . $page[0] . ".php") or (!file_exists("engine/pages/admin_" . $page[0] . ".php"))) && $page[0] != "" && $page[0] != "login" && $page[0] != "logout") {
$web_page = "404";
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
