在s上使用php执行python程序

2024-04-18 22:19:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个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;

Tags: pyecho程序hellooutput错误shellthis