View previous topic :: View next topic |
Author |
Message |
lazna -
Joined: 16 Aug 2015 Posts: 52
|
Posted: Wed Aug 10, 2016 9:58 am Post subject: win shell CGI - debugging technique |
|
|
Using win shell as a CGI, time-by-time need to start shell script from cmd line due to debugging. Need to distinguish if script is started by WEB server CGI engine or not. Have idea to check if variable %REMOTE_ADDR% is empty or not. Is it reliable solution? Are there any better ways?
L. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1306
|
Posted: Fri Oct 07, 2016 12:55 pm Post subject: Re: win shell CGI - debugging technique |
|
|
lazna,
Checking for env variable GATEWAY_INTERFACE to be set to CGI/1.1 is the way to go. Actually that's how PHP and many CGI/CLI tools do to distinguish the requested mode of operation. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
|