作者 lyh

gx

@@ -226,12 +226,14 @@ class BTemplateLogic extends BaseLogic @@ -226,12 +226,14 @@ class BTemplateLogic extends BaseLogic
226 public function saveCommonTemplate($param){ 226 public function saveCommonTemplate($param){
227 $templateCommonModel = new BTemplateCommon(); 227 $templateCommonModel = new BTemplateCommon();
228 $info = $templateCommonModel->read(['template_id'=>$param['template_id'],'project_id'=>$this->user['project_id']]); 228 $info = $templateCommonModel->read(['template_id'=>$param['template_id'],'project_id'=>$this->user['project_id']]);
  229 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(characterTruncation($param['html'],'/<link id="google-fonts-link"\b[^>]*>(.*?)<header/'), true) . PHP_EOL, FILE_APPEND);
229 $data = [ 230 $data = [
230 'head_html'=>$param['head_html'], 231 'head_html'=>$param['head_html'],
231 'head_css'=>$param['head_css'], 232 'head_css'=>$param['head_css'],
232 'footer_html'=>$param['footer_html'], 233 'footer_html'=>$param['footer_html'],
233 'footer_css'=>$param['footer_css'], 234 'footer_css'=>$param['footer_css'],
234 - 'other'=>str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link"\b[^>]*>(.*?)<header/s')), 235 +
  236 + 'other'=>str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link"\b[^>]*>(.*?)<header/')),
235 ]; 237 ];
236 if($info === false){ 238 if($info === false){
237 $data['template_id'] = $param['template_id']; 239 $data['template_id'] = $param['template_id'];