|
...
|
...
|
@@ -227,18 +227,12 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$templateCommonModel = new BTemplateCommon();
|
|
|
|
$info = $templateCommonModel->read(['template_id'=>$param['template_id'],'project_id'=>$this->user['project_id']]);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($param['html'], true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$input = "<link id=\"google-fonts-link\" asdasdahsjkdhasjkdhaksjdhkajsdhajksdhjkasdhajksdhka asdasdasdasd>asdhasjkdhajkdhakjdhakjdhaksjdhaksjdhaskjdhasjkdhasjkdhasjkdhaksd<header dasdasdasdas>";
|
|
|
|
$pattern = "/<link id=\"google-fonts-link\"(.*?)<header/s";
|
|
|
|
if (preg_match($pattern, $input, $matches)) {
|
|
|
|
$result = $matches[0];
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
}
|
|
|
|
$data = [
|
|
|
|
'head_html'=>$param['head_html'],
|
|
|
|
'head_css'=>$param['head_css'],
|
|
|
|
'footer_html'=>$param['footer_html'],
|
|
|
|
'footer_css'=>$param['footer_css'],
|
|
|
|
'other'=>str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link"\b[^>]*>(.*?)<header/')),
|
|
|
|
'other'=>str_replace('<header','',characterTruncation($param['html'],"/<link id=\"google-fonts-link\"(.*?)<header/s")),
|
|
|
|
];
|
|
|
|
if($info === false){
|
|
|
|
$data['template_id'] = $param['template_id'];
|
...
|
...
|
|