【发布时间】:2012-05-26 17:02:31
【问题描述】:
$cmdOutput = shell_exec("perl run_single_test/hello.pl");
echo "the command output = $cmdOutput";
这会导致文件hello.pl 执行并打印“hello world back to page”。但是
shell_exec("perl run_single_test/test_single_run.pl -s \"$testSuiteName\" -t \"$testName\" -i $time");
不会被执行。我将命令回显到屏幕并在终端上运行,Perl 脚本完美执行。 test_single_run.pl 创建一个日志文件并复制一些文件。
我错过了什么?
【问题讨论】:
-
test_single_run.pl的权限和hello.pl的权限一样吗? -
@daxim:
shell_exec是 PHP 内置函数。