php apache目录列表,下载所有

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5317219/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 20:59:12  来源:igfitidea点击:

apache directory listing, download all

phpapachedownload

提问by Marek Jav?rek

Is there any Windows tool or some way to download all the folders and files recursively from apache directory listing?

是否有任何 Windows 工具或某种方法可以从 apache 目录列表中递归下载所有文件夹和文件?

sample folder

示例文件夹

Thanks

谢谢

回答by martin blank

wget for windows(or http://gnuwin32.sourceforge.net/packages/wget.htm)

wget Windows(或http://gnuwin32.sourceforge.net/packages/wget.htm

Once installed it's as simple as: -

一旦安装,它就像: -

wget -m -np http://eamos.pf.jcu.cz/amos/kat_inf/externi/

The -mis an alias for --mirror. As a commenter noted, you probably want -npor --no-parentso that you don't go up in the directory structure. You might also want to add --wait=5so you don't thrash the web server, --convert-linksif you want local links in the html file when it's done, and --execute="robots = off"if you're not getting all of the files (ignores robots.txt file). Altogether now:

-m是一个别名--mirror。正如评论者指出的那样,您可能希望-np--no-parent这样您就不会进入目录结构。如果您希望在完成后在 html 文件中包含本地链接,并且您没有获得所有文件(忽略 robots.txt 文件),您可能还想添加--wait=5这样您就不会影响 Web 服务器。现在总共:--convert-links--execute="robots = off"

wget --execute="robots = off" --mirror --convert-links --no-parent --wait=5 http://eamos.pf.jcu.cz/amos/kat_inf/externi/