正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -226,13 +226,13 @@ class BTemplateLogic extends BaseLogic | @@ -226,13 +226,13 @@ 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 | -// $input = "<link id=\"google-fonts-link\" asdasdahsjkdhasjkdhaksjdhkajsdhajksdhjkasdhajksdhka asdasdasdasd>asdhasjkdhajkdhakjdhakjdhaksjdhaksjdhaskjdhasjkdhasjkdhasjkdhaksd<header dasdasdasdas>"; | 229 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($param['html'], true) . PHP_EOL, FILE_APPEND); |
| 230 | + $input = "<link id=\"google-fonts-link\" asdasdahsjkdhasjkdhaksjdhkajsdhajksdhjkasdhajksdhka asdasdasdasd>asdhasjkdhajkdhakjdhakjdhaksjdhaksjdhaskjdhasjkdhasjkdhasjkdhaksd<header dasdasdasdas>"; | ||
| 230 | $pattern = "/<link id=\"google-fonts-link\"(.*?)<header/"; | 231 | $pattern = "/<link id=\"google-fonts-link\"(.*?)<header/"; |
| 231 | - if (preg_match($pattern, $param['html'], $matches)) { | 232 | + if (preg_match($pattern, $input, $matches)) { |
| 232 | $result = $matches[1]; | 233 | $result = $matches[1]; |
| 233 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND); | 234 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND); |
| 234 | } | 235 | } |
| 235 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export(characterTruncation($param['html'],'/<link id="google-fonts-link"[^<]*<header/'), true) . PHP_EOL, FILE_APPEND); | ||
| 236 | $data = [ | 236 | $data = [ |
| 237 | 'head_html'=>$param['head_html'], | 237 | 'head_html'=>$param['head_html'], |
| 238 | 'head_css'=>$param['head_css'], | 238 | 'head_css'=>$param['head_css'], |
-
请 注册 或 登录 后发表评论