John,
Netscape! Differences between servers AND differences between browsers AND differences
between in-browser and
command-line operations!
Isn't life fun?
Like you I'm messing around with some of these differences as part of a bid to
'convert' an existing set of
scripts from browser i/f to c
"Dl Neil" <[EMAIL PROTECTED]> wrote in message
0a4e01c15e72$c47db560$a516100a@jrbrown">news:0a4e01c15e72$c47db560$a516100a@jrbrown...
> Thanks for the idea. I have just resurrected and had another play with my
'testbench.php', running it from both
> IE/Apache and in a DOS box.
>
> It includes the
tains the number of command line parameters passed to the script (if run
> on the command line).
>
> In case you have any parameter
>
>
>
> hope this helps... and this should work on windows too.
>
> - Original Message -
> From: "DL Neil" <[EM
On Fri, 26 Oct 2001 23:12:17 +0100, DL Neil wrote:
>Mark,
>Backing John's question up by one iteration: is there a PHP
>environment variable which can be used to
>distinguish between code being run from the command line and code
>being run in a browser?
I guess the best way is to check for a comm
TED]>
Sent: Friday, October 26, 2001 6:12 PM
Subject: Re: [PHP] how to recognize local or server execution?
> Mark,
> Backing John's question up by one iteration: is there a PHP environment
variable which can be used to
> distinguish between code being run from the command line a
Mark,
Backing John's question up by one iteration: is there a PHP environment variable which
can be used to
distinguish between code being run from the command line and code being run in a
browser?
- and the Million dollar question, sorry make that the M$ question: will it also work
under Windo
use $GLOBALS[SERVER_ADDR] it will return the IP address of the server. then
use that in an if..then..else
Jim
- Original Message -
From: "John A. Grant" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 26, 2001 2:18 PM
Subject: [PHP] how to rec
Try using apache var $SERVER_SOFTWARE in order to know where you are
- Original Message -
From: "John A. Grant" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 26, 2001 5:18 PM
Subject: [PHP] how to recognize local or server execution?
> I
On Fri, 26 Oct 2001 17:18:37 -0400, John A. Grant wrote:
>I have an xxx.php page that runs on my Unix server. I also
>run php.exe on my NT box to generate the corresponding
>xxx.html file like this:
> c:\> php -q xxx.php > xxx.html
>
>The xxx.php file contains stuff like this:
> print "hello\n"
I have an xxx.php page that runs on my Unix server. I also
run php.exe on my NT box to generate the corresponding
xxx.html file like this:
c:\> php -q xxx.php > xxx.html
The xxx.php file contains stuff like this:
print "hello\n";
That means stdout from the server and the xxx.html file
b
10 matches
Mail list logo