这样写调用不成功:
$feed="rtmp://v2.gdtv.cn:1935/live/sport";
$caster_id="baw";
$gameName="GermenVSJapan";
$command="python textcasting_stream_py/start_capture_stream.py ".$feed." ".$caster_id." ".$gameName;
system($command);而写成这样是成功的:system("python textcasting_stream_py/start_capture_stream.py rtmp://v2.gdtv.cn:1935/live/sport Kobe GermenVSJapan");
感觉是一样的啊,只是字符串连接了一下,哪位大神能解答一下,小弟不甚感激!
$feed="rtmp://v2.gdtv.cn:1935/live/sport";
$caster_id="baw";
$gameName="GermenVSJapan";
$command="python textcasting_stream_py/start_capture_stream.py ".$feed." ".$caster_id." ".$gameName;
system($command);而写成这样是成功的:system("python textcasting_stream_py/start_capture_stream.py rtmp://v2.gdtv.cn:1935/live/sport Kobe GermenVSJapan");
感觉是一样的啊,只是字符串连接了一下,哪位大神能解答一下,小弟不甚感激!
python textcasting_stream_py/start_capture_stream.py rtmp://v2.gdtv.cn:1935/live/sport baw GermenVSJapan
成功的
python textcasting_stream_py/start_capture_stream.py rtmp://v2.gdtv.cn:1935/live/sport Kobe GermenVSJapan
你确定你用
system($command);system("python textcasting_stream_py/start_capture_stream.py rtmp://v2.gdtv.cn:1935/live/sport Kobe GermenVSJapan");
都在同一个php内测是么?建议把你的py程序用绝对路径再试试