[英]how to run big python script in php using browser
I have tried all the php method to run my python script in php like exec(),shell_exec(),system(),popen() etc but nothing is working , if try the php from terminal it is working fine 我已经尝试了所有的php方法来在php中运行python脚本,例如exec(),shell_exec(),system(),popen()等,但没有任何效果,如果从终端尝试php则效果很好
Here is my script 这是我的剧本
test.php
<?php
$term = system(python /home/user/script.py /input-path/input/ /output-path/output
)>
Try this: 尝试这个:
<?php
$term = system("/usr/bin/python /home/user/script.py /input-path/input/ /output-path/output"
)>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.