我有一个python程序,我想从php执行我已经尝试过“exec,escapeshellcmd,shell\u exec,passthru,popen”,但没有人给出结果。你知道吗
我已经成功地执行了“hello word”程序,但是我需要的程序没有执行,也没有显示任何错误。你知道吗
echo $python = exec("python python/interactive.py");//this file not working
echo $python = passthru("python python/python.py ");// this is working with hello world.
$output = shell_exec($command);
echo $output;
我建议您研究像Flask或Django这样的pythonweb框架,如果您想在web上执行python脚本,这是两个主要的框架网站。这个这是最好的办法。你知道吗
相关问题 更多 >
编程相关推荐