php-windows Digest 10 Jan 2006 03:00:27 -0000 Issue 2863
Topics (messages 26614 through 26616):
Re: If code not working?
26614 by: M. Sokolewicz
26615 by: M. Sokolewicz
browscap.ini
26616 by: Tony Trapp
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
I agree with the points about the futility of having a 0 there, however,
it won't have any impact on how it works :)
why? just follow the logic:
if the ip equals x.x.x.x: access_disabled
OR
if the ip equals y.y.y.y: access_disabled
OR
if FALSE: (never happens)
so, what you get is that on true from #1 or #2 it shows access_disabled,
on anything else, it skips the if. So, in this case it doesn't matter...
though it's still sloppy.
-tul
Paul Menard wrote:
Um. What is the '0' for?
if(
($_SERVER["REMOTE_ADDR"]=="x.x.x.x")||
($_SERVER["REMOTE_ADDR"]=="y.y.y.y")||
0 <-- This should not be here.
)
----- Original Message ----
From: Christopher Malton <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, January 04, 2006 13:00:24
Subject: [PHP-WIN] If code not working?
To all,
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["REMOTE_ADDR"]=="x.x.x.x")||
($_SERVER["REMOTE_ADDR"]=="y.y.y.y")||
0
){
header("Location: /access_disabled.php");
exit();
}
?>
Chris
--- End Message ---
--- Begin Message ---
I agree with the points about the futility of having a 0 there, however,
it won't have any impact on how it works :)
why? just follow the logic:
if the ip equals x.x.x.x: access_disabled
OR
if the ip equals y.y.y.y: access_disabled
OR
if FALSE: (never happens)
so, what you get is that on true from #1 or #2 it shows access_disabled,
on anything else, it skips the if. So, in this case it doesn't matter...
though it's still sloppy.
-tul
Paul Menard wrote:
Um. What is the '0' for?
if(
($_SERVER["REMOTE_ADDR"]=="x.x.x.x")||
($_SERVER["REMOTE_ADDR"]=="y.y.y.y")||
0 <-- This should not be here.
)
----- Original Message ----
From: Christopher Malton <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, January 04, 2006 13:00:24
Subject: [PHP-WIN] If code not working?
To all,
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["REMOTE_ADDR"]=="x.x.x.x")||
($_SERVER["REMOTE_ADDR"]=="y.y.y.y")||
0
){
header("Location: /access_disabled.php");
exit();
}
?>
Chris
--- End Message ---
--- Begin Message ---
hey guys found this message on the web by using google.
>From all that I know, 'browscap.ini' is to be placed in
"'drive':\windows\system\inetsrv" and referred to as such under the
[browscap] caption of the php.ini file.
Hope this helps.
GKE
"Hassan Shaikh" <E-mail Protected> wrote in message
news:E-mail Protected...
| Hi All,
|
| I am getting *Cannot open 'c:\PHP\extra\browscap.ini' for reading* on a
| Windows 2003/IIS setup with PHP. Can anyone help out? Seems like a
| pretty known error coz many links were found while Googling.
|
| Thanks.
|
|
| Hassan
If this person needs help I can do that as mine is working fine I can help with
the config of php.ini to make thos work right as my system is the same.
Tony...
--- End Message ---