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 delta降尺度计算的一些细节,有偿
    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程
    • ¥15 redis-full-check比较 两个集群的数据出错
    • ¥15 Matlab编程问题
    • ¥15 训练的多模态特征融合模型准确度很低怎么办
    • ¥15 kylin启动报错log4j类冲突
    • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
    • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序