WAMP 环境下, test.php 文件内容如下:
$python_path = 'D:\\Program Files\\Python\\Python35-32\\python.exe';
$python_script = 'F:\\Website\\test\\test.py';
$command = '$python_path $python_script';
exec($command, $output, $result);
test.py 文件中只有一句:
print('ok')
目前执行情况是$result 的值为 1 ,应该是命令正常执行了吧
但是$output 是个空的 Array ,看文档输出结果不是应该存在这个 Array 里面吗,为何这里是空的
请大神指点一下,非常感谢