shell_execute(''youtube-dl') 不工作。浏览器显示 NULL。为什么?
shell_execute(''youtube-dl') NOT WORKING .browser shows NULL. why?
这是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#
但是当我 运行 在 网络浏览器上
显示
将以下行添加到您的 shell_exec():
LD_LIBRARY_PATH=''
例如片段:
shell_exec("LD_LIBRARY_PATH='' youtube-dl https://yotube.com?xxxxxx");
这是一个 python 问题。即使我也有同样的问题。
它会修复它
这是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#
但是当我 运行 在 网络浏览器上
显示
将以下行添加到您的 shell_exec():
LD_LIBRARY_PATH=''
例如片段:
shell_exec("LD_LIBRARY_PATH='' youtube-dl https://yotube.com?xxxxxx");
这是一个 python 问题。即使我也有同样的问题。
它会修复它