php shell_exec在web执行的出错 2018年5月14日 Leave a comment chenjianle 执行 shell_exec(‘python xxxx.py’)时候没有反应,直接返回null。根据我前几天上红帽linux培训的时候,老师说过一些软件进入shell是没有环境变量的,都写绝对路径的。所以我尝试把他换为绝对路径来执行 于是成功了。 总结shell_exec 请最好使用绝对路径来执行 Post navigation previous postNext Post