【发布时间】:2014-01-28 16:27:06
【问题描述】:
我正在尝试在 Eclipse 环境中从 PHP 执行 Octave 脚本。 PHP 的设置,Apache 的工作呢。该问题与以下调用有关:
$cmd = "octave3.8 -qf /.../path_to_file/myscript.m file.txt";
$ex = passthru($cmd, $output);
var_dump($ex);
var_dump($output);
在脚本 myscript.m 中有:
e = 5 % too see if it will be printed onto the web page
arg = argv();
data = load(arg{1});
结果是: NULL int(1)
几个主题演讲:
- 来自终端的相同命令工作正常(octave3.8 -qf /../path_to_file/myscript.m file.txt)
- 我已经尝试让 PHP 进程由 sudoer 运行
在 Ubuntu 12.04、Octave 3.8.0、Eclipse 标准/SDK 2.0.1.、PHP 开发工具 3.2.0.
【问题讨论】:
-
你做到了吗?
-
你有什么解决办法吗,请分享..