CLI/web test
From: John (john.walsh_at_mini-net.co.uk)
Date: 12/30/04
- Next message: Manuel Lemos: "Re: Using PHP to send IM or SMS Text"
- Previous message: Matthias Esken: "Re: PHP clients: what web-service is best? (SOAP etc)"
- Next in thread: Janwillem Borleffs: "Re: CLI/web test"
- Reply: Janwillem Borleffs: "Re: CLI/web test"
- Reply: Pedro Graca: "Re: CLI/web test"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Dec 2004 18:07:35 +0000
Hi,
Is there a recognised (ie. reliable) way for a script to test
if it is being run from the command line or through a web server ?
My guess whould have been :-
if (isset($_SERVER))
THEN it is being run from a web server.
But this may also be set when run through the CLI ?
Any suggestions ?
Thanks,
John.
- Next message: Manuel Lemos: "Re: Using PHP to send IM or SMS Text"
- Previous message: Matthias Esken: "Re: PHP clients: what web-service is best? (SOAP etc)"
- Next in thread: Janwillem Borleffs: "Re: CLI/web test"
- Reply: Janwillem Borleffs: "Re: CLI/web test"
- Reply: Pedro Graca: "Re: CLI/web test"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|