Home > Archive > PERL CGI Beginners > June 2006 > Re: What is the reason for different outputs for a cgi script run
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: What is the reason for different outputs for a cgi script run
|
|
| Sfantar 2006-06-20, 7:56 am |
| David Dorward a écrit :
> On Tue, Jun 20, 2006 at 10:25:33AM +0200, sfantar wrote:
>
> The environment the webserver runs is different to the environment
> your shell runs.
>
Where can I find how the environment of the webserver is configured
concerning perl?
| |
| Owen Cook 2006-06-20, 7:56 am |
|
On Tue, 20 Jun 2006, sfantar wrote:
> David Dorward a =E9crit :
w=20[color=darkred]
> Where can I find how the environment of the webserver is configured=20
> concerning perl?
>=20
>=20
try something like this (untested);
#!/usr/bin/perl
print "Content-type: text/html\n\n";
foreach $key(sort keys(%ENV)) {
print "$key =3D $ENV{$key}<br>";
}
--=20
Owen
| |
| Sfantar 2006-06-20, 7:56 am |
| Owen Cook a écrit :
>
>
> On Tue, 20 Jun 2006, sfantar wrote:
>
>
> try something like this (untested);
>
> #!/usr/bin/perl
>
> print "Content-type: text/html\n\n";
>
> foreach $key(sort keys(%ENV)) {
> print "$key = $ENV{$key}<br>";
>
> }
It works.This is what I was looking for. Thanks.
|
|
|
|
|