作者 赵彬吉
... ... @@ -304,11 +304,11 @@ class BTemplateLogic extends BaseLogic
* @time :2023/12/13 15:39
*/
public function handleAllHtml($commonInfo,$html){
if(!empty($commonInfo)){
if(!empty($commonInfo['head_html']) && !empty($commonInfo['footer_html'])){
$html = preg_replace('/<header\b[^>]*>(.*?)<\/header>/s', $commonInfo['head_html'], $html);
$html = preg_replace('/<footer\b[^>]*>(.*?)<\/footer>/s', $commonInfo['footer_html'], $html);
$html = preg_replace('/<style id="globalsojs-header">(.*?)<\/style>/s', $commonInfo['head_css'], $html);
$html = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', $commonInfo['footer_css'], $html);
$html = preg_replace('/<style id="globalsojs-header">(.*?)<\/style>/s', $commonInfo['head_style'] ?? '', $html);
$html = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', $commonInfo['footer_style'] ?? '', $html);
}
return $html;
}
... ...