|
...
|
...
|
@@ -226,12 +226,10 @@ class BTemplateLogic extends BaseLogic |
|
|
|
public function saveCommonTemplate($param){
|
|
|
|
$templateCommonModel = new BTemplateCommon();
|
|
|
|
$info = $templateCommonModel->read(['template_id'=>$param['template_id'],'project_id'=>$this->user['project_id']]);
|
|
|
|
$input = "<link id='1' asdjaklsd dajdklasdjl dasdjkl> dasdklasdlk fasfjasklfjakl fasfjkl <header sadasdasd dsadsa ad >";
|
|
|
|
$pattern = "/<link id='1'[^<]*<header/";
|
|
|
|
if (preg_match($pattern, $input, $matches)) {
|
|
|
|
$pattern = '/<link id="google-fonts-link"[^<]*<header/';
|
|
|
|
if (preg_match($pattern, $param['html'], $matches)) {
|
|
|
|
$result = $matches[0];
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
|
|
|
|
echo $result;
|
|
|
|
} else {
|
|
|
|
echo "未找到匹配内容";
|
...
|
...
|
|