如何在命令行中运行命令时运行shell_exec

时间:2017-06-30 04:48:12

标签: php python

我有一个python脚本,当我使用cmd运行脚本时它工作正常。但是当我使用php shell_exec运行它时,它给出了以下错误:

scp.SCPException: scp: c7200-ipbasek9-mz.150-1.M10.bin: No such file or directory

只想知道使用shell exec调用脚本的正确方法是什么。

使用cmd运行

E:\Python36>python.exe open.py

这成功运行了脚本

使用shell_exec

运行
$output = shell_exec("E:\Python36\\python.exe E:\Python36\\open.py");

任何帮助将不胜感激!谢谢!

0 个答案:

没有答案
相关问题