这是 try.php 文件
<?
echo shell_exec('youtube-dl https://yotube.com?xxxxxx');
?>
在命令行上
php try.php
给了我以下
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[youtube] 5Zq5wjkJ_Es: Downloading webpage
[youtube] 5Zq5wjkJ_Es: Extracting video information
[youtube] 5Zq5wjkJ_Es: Downloading DASH manifest
root@vps:/usr/bin#
但是当我在网络浏览器
上运行时 它显示了答案 0 :(得分:1)
将以下行添加到shell_exec():
<强> LD_LIBRARY_PATH =&#39;&#39; 强>
对于示例代码段:
shell_exec("LD_LIBRARY_PATH='' youtube-dl https://yotube.com?xxxxxx");
这是一个蟒蛇问题。即使我有同样的问题。
它会修复它