在 shell_exec 中使用 wget 下载和保存文件 [英] Downloading and saving file by using wget in shell_exec
本文介绍了在 shell_exec 中使用 wget 下载和保存文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从命令行下载文件当我在 shell 中运行命令时,它会起作用,但是当我想在 PHP 中执行它时,没有结果
I want to download files from commandline when I run the command in shell it will work but when I want to execute it in PHP,No result
$cmd='wget http://cvs.snort.org/viewcvs.cgi/snort/rules/dns.rules'
$output=shell_exec($cmd);
echo "<pre>$output</pre>";
我只是想从这个网站下载
I just wanted to download from this site
任何帮助将不胜感激
我该如何纠正?
如果解决方案是Curl我该怎么写
if the solution is Curl how can I write it
推荐答案
这篇关于在 shell_exec 中使用 wget 下载和保存文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文