下载文件错误后不生成优化页面

hotfix/远程访问多媒体中心
尹诚诚 8 years ago
parent 98b7e312a4
commit a4741afa2e

@ -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 '<!-- ' . $css_content . ' -->';
return FALSE;
}

Loading…
Cancel
Save