【发布时间】:2012-07-05 01:35:40
【问题描述】:
我想如下运行wget
shell_exec('wget "'http://somedomain.com/somefile.mp4'"');
sleep(20);
continue my code...
我想要的是让 PHP 等待 shell_exec wget 文件下载完成,然后再继续执行其余代码。我不想等待设定的秒数。
我该怎么做,因为当我运行 shell_exec wget 时,文件将开始下载并在后台运行,PHP 将继续。
【问题讨论】: