dtah63820 2016-08-11 09:29
浏览 176
已采纳

从Django项目中调用PHP脚本:无法打开输入文件

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.

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样