mickys Posted May 23, 2009 Report Share Posted May 23, 2009 (edited) $currentpathmdw = pathinfo($_SERVER['SCRIPT_FILENAME']); $mdwcurfile= $currentpathmdw["basename"]; if($mdwcurfile == "admin.php" || "a_jaunumi.php" || "a_bildes.php" || "a_viesu_gramata.php" || "a_dalibnieki.php" || "a_galerijas.php" || "a_sakums.php") {echo "ir"; } else{ echo "nav";} princips rāds, ka vajag izvadīt ir, ja faila nosaukums vienāds ar kādu no dotajiem, ja nav, tad izvadam nav, bet šis variants izvada "ir" jebkurā gadījumā Nevaru ieraudzīt kļūdu, palīdziet lūdzu :) Edited May 23, 2009 by mickys Quote Link to comment Share on other sites More sharing options...
bubu Posted May 23, 2009 Report Share Posted May 23, 2009 Sintakse ir šāda: if ($a == $b || $a == $c || $a == $d)... Vai arī: if (in_array($a, array($b, $c, $d)))... Quote Link to comment Share on other sites More sharing options...
mickys Posted May 23, 2009 Author Report Share Posted May 23, 2009 Huh, mana vaina, paldies bubu, slēgt Quote Link to comment Share on other sites More sharing options...
Delfins Posted May 26, 2009 Report Share Posted May 26, 2009 Nu vienkāršības pēc var arī masīvā salikt. Ērtāk menedžēt to sarakstu būs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.