|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
|
|||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
If code not working?
[snip]
I appear to have a problem with my If statement. No error is presented to me, but does anyone see what is wrong. IP addresses masked for safety & security. Code as follows: <?php if(($_SERVER["REMTE_ADDR"]=="x.x.x.x")||($_SERVER["REMTE_ADDR"]=="y.y.y.y" )||0){ header("Location: /access_disabled.php"); exit(); } ?> [/snip] echo $_SERVER["REMTE_ADDR"] and see what is there. I would also add parentheses to the statement, surrounding only the IP tests; if((($_SERVER["REMTE_ADDR"]=="x.x.x.x")||($_SERVER["REMTE_ADDR"]=="y.y.y.y "))||0){ saying "if (remote address R remore address) R false -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
![]() |
| Viewing: Web Development Archives > Mailing Lists > PHP - Windows > If code not working? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|