diff --git a/application/third_party/htmlcompressor/controllers/index.php b/application/third_party/htmlcompressor/controllers/index.php
index fceba443..bbf12e44 100644
--- a/application/third_party/htmlcompressor/controllers/index.php
+++ b/application/third_party/htmlcompressor/controllers/index.php
@@ -41,7 +41,13 @@ class Index extends CI_Controller {
}
//print_r($link_css_array);
foreach ($link_css_array as $item) {
- $css_content.= GET_HTTP($this->format_url($item, $websitehost));
+ $get_http_temp = GET_HTTP($this->format_url($item, $websitehost));
+ if ($get_http_temp == false) {
+ $this->output->set_status_header(404);
+ echo 'CSS文件下载错误';
+ return FALSE;
+ }
+ $css_content.=$get_http_temp;
}
foreach ($html_object->find('style') as $style_css) {
if ($style_css->type == "text/css") {
@@ -75,7 +81,13 @@ class Index extends CI_Controller {
$js_scr_content = '';
foreach ($link_js_array as $item) {
- $js_scr_content.= GET_HTTP($this->format_url($item, $websitehost));
+ $get_http_temp = GET_HTTP($this->format_url($item, $websitehost));
+ if ($get_http_temp == false) {
+ $this->output->set_status_header(404);
+ echo 'JS文件下载错误';
+ return FALSE;
+ }
+ $js_scr_content.=$get_http_temp;
}
//echo $js_content;
//把网页内容和css提交到purifycss处理
@@ -83,7 +95,6 @@ class Index extends CI_Controller {
if (empty($optimize_css)) {
$this->output->set_status_header(500);
echo 'css精简错误';
- echo '';
return FALSE;
}