正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -215,7 +215,7 @@ class HtmlCollect extends Command | @@ -215,7 +215,7 @@ class HtmlCollect extends Command | ||
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | #Description | 217 | #Description |
| 218 | - preg_match_all('/<meta name=[\'|\"]description[\'|\"]\s+[^>]*?content=[\'|\"]([\w\W]*?)[\'|\"]/', $html, $matches); | 218 | + preg_match_all('/<meta\s+[^>]*?name=[\'|\"]description[\'|\"]\s+[^>]*?content=[\'|\"]([\w\W]*?)[\'|\"]/', $html, $matches); |
| 219 | if (!empty($matches[1])) { | 219 | if (!empty($matches[1])) { |
| 220 | $meta['description'] = substr($matches[1][0], 0, 255); | 220 | $meta['description'] = substr($matches[1][0], 0, 255); |
| 221 | } | 221 | } |
-
请 注册 或 登录 后发表评论