【发布时间】:2015-04-12 15:04:40
【问题描述】:
我可以从命令行“php youtube-dl.php”运行 youtube-dl.php 工作正常
但不能从 http... 是不是和 chown 有关系?
$url = "https://www.youtube.com/watch?v=KdS6HFQ_LUc";
echo "Saving $url";
$cmd = 'youtube-dl -o "/var/www/domain.com/test/%(title)s.%(ext)s" '.$url.' -f bestvideo+bestaudio';
exec($cmd, $output, $ret);
echo 'output: ';
var_export($output);
回显 "\nret: "; var_export($ret);
【问题讨论】:
-
很确定这不是 perl。或者,如果是,它是相当糟糕的 perl。对于初学者 - 没有
echo。
标签: perl ffmpeg youtube-dl