2016-08-11 09:29
浏览 143


I wrote a PHP script that processes some task for me (specifically, encoding videos on a media server). I tested calling this script via python like so:

proc = subprocess.Popen("php vodworkflow_drm_playready_widevine.php videos " +str(video), shell=True, stdout=subprocess.PIPE)

This worked correctly (i.e. the video name passed to the script got correctly encoded and such). However, when I call Popen from inside my Django project, I instead get the output: Could not open input file: my_script.php.

I'm stumped! Can anyone help with what could be going on, and what I can do to rectify this? Thanks, I've been stuck since a while now. Do let me know if you need to see the PHP script and more detailed code.

图片转代码服务由CSDN问答提供 功能建议

我写了一个PHP脚本,为我处理一些任务(特别是在媒体服务器上编码视频)。 我通过python测试调用这个脚本如下:

  proc = subprocess.Popen(“php vodworkflow_drm_playready_widevine.php videos”+ str(video),shell = True,stdout = subprocess  .PIPE)

这个工作正常(即传递给脚本的视频名称得到了正确编码等)。 但是,当我从我的Django项目中调用 Popen 时,我得到输出:无法打开输入文件:my_script.php

我很难过! 任何人都可以帮助解决可能发生的事情,以及我可以做些什么来纠正这个问题? 谢谢,我已经被困了一段时间了。 如果您需要查看PHP脚本和更详细的代码,请告诉我。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新