Perl 反引號調(diào)用求助
3 回答

aluckdog
TA貢獻1847條經(jīng)驗 獲得超7個贊
my $cur_dir = `pwd`;
chomp($cur_dir);
my $file = "$cur_dir/bin/ProcessDir.exe";
if(-e $file){
my $str = `$file`; #see below comments:
print "str is $str \n";
}
#直接在windows cygwin下面調(diào)用返回正常,但通過CGI調(diào)用后$str返回為空string.
解決
把 $cur_dir 輸出到網(wǎng)頁上查看是什么內(nèi)容。
用 print "$@ $! $^E $?\n" 看看這些變量都什么內(nèi)容
- 3 回答
- 0 關(guān)注
- 705 瀏覽
添加回答
舉報
0/150
提交
取消