On Tuesday, June 11, 2002, at 09:14 , phumes1 wrote:
> This way if someone runs the script from a command prompt I output it to
> the screen using >CON: and if its run from a web browser then I redirect
> it to a file and then read that file to the browser after completion
> using >output.txt
OK...thanks for all the great examples but because I'm running either
manually from a command prompt our from a batch file via web browser they
are both being executed as a command prompt. This is how ColdFusion sees it.
SoI have a batch file with the following line. Note: The runme.exe i
On Tuesday, June 11, 2002, at 09:58 , phumes1 wrote:
> Weird.
>
> I put the below lines in my perl script and ran it from the command
> prompt and from a web browser yet the results are telling me
> that "You have started this script from the command prompt"
>
> Why?
>
> Is the HTTP_USER_AGENT
Hang on...I have a batch file that is being executed. In the batch file
contains my perl script that I'm executing so the below does work.
If anyone is familiar with Allaire Cold FUsion I'm using the Hi,
>
>There should be many ENV that would only be set if you are using a
>browser, but
>one of
+0200 (METDST)
>From: David vd Geer Inhuur tbv IPlib <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: Re: Checking environment variables...outputting to file
>
>
>Hi,
>
>There should be many ENV that would only be set if you are using a
>brow
Hi,
There should be many ENV that would only be set if you are using a browser, but
one of them might be HTTP_USER_AGENT.
Here is a tested example :
#
if($ENV{'HTTP_USER_AGENT'}) {
print "Content-type: text/html\n\n";
print " You are using a browser";
}
else { print "You have started t
Hi,
I thought of another way possibly...of doing this.
Is there a way through environment variables (or someother way) to check to
see if the perl script is being run via command prompt or from a browser
(web interface)?
This way if someone runs the script from a command prompt I output it to