dougan7657 2015-07-21 21:00
浏览 225

如何确认php shell_exec是否已完成

I am running a php script using the cPanel Cron Jobs. The script is using shell_exec to convert a video using ffmpeg. It executes the script and everything is working but it is not sending me the email. I am basically trying to get the output of the shell_exec to start another function in the php script so I wanted to send my self the email to make sure I am getting the output.

For example I wrote:

$command = "ffmpeg -i $og_video -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 $mp4_video";

//EXECUTE THE CONVERSION
$output = shell_exec($command);
echo $output;

I also tested the email by removing the shell_exec and just echo the $command variable. This will send me the full string in an email.

What I am trying to accomplish is basically if the shell_exec executed then do something else.

How do I check if the shell_exec was completed?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 程序不包含适用于入口点的静态Main方法
    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记