CLI/web test

From: John (john.walsh_at_mini-net.co.uk)
Date: 12/30/04


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.



Relevant Pages

  • Re: Perl and IIS - script runs but The page cannot be displayed
    ... What happened when you ran the script at the command line? ... running it through the web server - especially if you use the CGI ... touch a web server for development purposes. ...
    (comp.lang.perl.misc)
  • Re: Web Help
    ... And save it as "certificate.php" on your web server. ... do to get around the limitations with IWP reports is to build your own. ... and the "Go to URL" script step. ... Printing from the web is not the best as you can not compress ...
    (comp.databases.filemaker)
  • Script using dll and ocx (to integrate in IIS )
    ... I have a script for an Motion Jpeg that I have to integrate into a website ... to get a "live Image" from a network camera. ... But in this script I have to install a dll and an oxc on my ... Create a Web Server alias and use this as the image ...
    (microsoft.public.inetserver.iis.ftp)
  • Sript using a dll an a ocx (to intigrate in IIS)
    ... I have a script for an Motion Jpeg that I have to integrate into a website ... to get a "live Image" from a network camera. ... But in this script I have to install a dll and an oxc on my ... Create a Web Server alias and use this as the image ...
    (microsoft.public.inetserver.iis)
  • Re: shorten time to attempt to connect to back end
    ... Is it not the case that the web server could be written in any ... The script on that web server could be ASP, ... I'm not sure why the dependency on IE is needed. ... FTP script to upload data, and then called a CGI script on that web ...
    (comp.databases.ms-access)