作者 lyh

gx

... ... @@ -441,6 +441,6 @@ function characterTruncation($string,$pattern){
$result = $matches[0];
return $result; // 输出:这是footer标签的内容
} else {
return [];
return '';
}
}
... ...
... ... @@ -109,8 +109,6 @@ class BTemplateLogic extends BaseLogic
//字符串截取
$this->StringProcessing();
$this->param['project_id'] = $this->user['project_id'];
var_dump($this->param);
die();
$rs = $this->model->add($this->param);
}else{
$this->StringProcessing();
... ... @@ -135,7 +133,7 @@ class BTemplateLogic extends BaseLogic
$this->param['main_html'] = characterTruncation($this->param['html'],'/<main\b[^>]*>(.*?)<\/main>/s');
$this->param['footer_html'] = characterTruncation($this->param['html'],'/<footer\b[^>]*>(.*?)<\/footer>/s');
$this->param['head_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-header">(.*?)<\/style>/s');
$this->param['main_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-style">(.*?)<\/style>/s');
$this->param['main_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-styles">(.*?)<\/style>/s');
$this->param['footer_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-footer">(.*?)<\/style>/s');
}
}
... ...