作者 lyh

重写demo脚本

@@ -372,8 +372,8 @@ class InitHtmlLogic extends BaseLogic @@ -372,8 +372,8 @@ class InitHtmlLogic extends BaseLogic
372 if(!empty($commonInfo['head_html']) && !empty($commonInfo['footer_html'])){ 372 if(!empty($commonInfo['head_html']) && !empty($commonInfo['footer_html'])){
373 $html = preg_replace('/<header\b[^>]*>(.*?)<\/header>/s', $commonInfo['head_html'], $html); 373 $html = preg_replace('/<header\b[^>]*>(.*?)<\/header>/s', $commonInfo['head_html'], $html);
374 $html = preg_replace('/<footer\b[^>]*>(.*?)<\/footer>/s', $commonInfo['footer_html'], $html); 374 $html = preg_replace('/<footer\b[^>]*>(.*?)<\/footer>/s', $commonInfo['footer_html'], $html);
375 - $html = preg_replace('/<style id="globalsojs-header">(.*?)<\/style>/s', $commonInfo['head_css'], $html);  
376 - $html = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', $commonInfo['footer_css'], $html); 375 + $html = preg_replace('/<style id="globalsojs-header">(.*?)<\/style>/s', $commonInfo['head_style'] ?? '', $html);
  376 + $html = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', $commonInfo['footer_style'] ?? '', $html);
377 } 377 }
378 return $html; 378 return $html;
379 } 379 }