- 论坛徽章:
- 0
|
perl -e "my $ret=`echo \$HOME`; print $ret;"
在命令行执行没有问题,但是作为CGI执行就什么也没有了。
...
maorui 发表于 2010-09-09 18:31
Hi,
running perl in shell and in Apache, the 环境变量 is different!
Under shell, perl gets shell enviroment variables.
In Apache, perl as CGI gets Apache environment variables. Pls refer to Apache document => SetEnv.
If you want to set $HONE as an Apache ENV, you should configurate apache.
Apache config. Syntax:
SetEnv <ENV_NAME> = <ENV_VALUE>
actually your question is belong to apache, not perl! |
|