我正在使用 php 中的 wget 命令来下载 css 样式表及其依赖项。
exec ("wget -p --convert-links -nH -nd --no-check-certificate http://infidelphia.com/style.css -P /home/devuser/public_html/Tset/");
有一个样式表和几个图像。当我在命令行中执行它时:
wget -p --convert-links -nH -nd --no-check-certificate http://infidelphia.com/style.css -P /home/devuser/public_html/Tset/
我看到其中一个资源有 404,但下载后其他所有资源都很好。
但是,当我通过 PHP 执行此资源时,跳过此资源后的所有内容。有什么方法可以确保跳过失败的下载/错误并且可以下载其余资产?