正在显示
1 个修改的文件
包含
2 行增加
和
4 行删除
| @@ -226,12 +226,10 @@ class BTemplateLogic extends BaseLogic | @@ -226,12 +226,10 @@ 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='1' asdjaklsd dajdklasdjl dasdjkl> dasdklasdlk fasfjasklfjakl fasfjkl <header sadasdasd dsadsa ad >"; | ||
| 230 | - $pattern = "/<link id='1'[^<]*<header/"; | ||
| 231 | - if (preg_match($pattern, $input, $matches)) { | 229 | + $pattern = '/<link id="google-fonts-link"[^<]*<header/'; |
| 230 | + if (preg_match($pattern, $param['html'], $matches)) { | ||
| 232 | $result = $matches[0]; | 231 | $result = $matches[0]; |
| 233 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND); | 232 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND); |
| 234 | - | ||
| 235 | echo $result; | 233 | echo $result; |
| 236 | } else { | 234 | } else { |
| 237 | echo "未找到匹配内容"; | 235 | echo "未找到匹配内容"; |
-
请 注册 或 登录 后发表评论