Commit 6ba13c1f by 汪伟伟

ini_set('pcre.backtrack_limit', '2097152');

parent d5010858
...@@ -342,6 +342,7 @@ class AlreadyDoneTaskController extends AdminController ...@@ -342,6 +342,7 @@ class AlreadyDoneTaskController extends AdminController
$form->saved(function (Form $form) { $form->saved(function (Form $form) {
$start = 'src="'; $start = 'src="';
$end = '" alt'; $end = '" alt';
ini_set('pcre.backtrack_limit', '2097152');
$pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/'; $pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/';
preg_match_all($pattern, $form->input('collects.net_img'), $matches); preg_match_all($pattern, $form->input('collects.net_img'), $matches);
$images = ''; $images = '';
......
...@@ -366,9 +366,9 @@ class NoDoneTaskController extends AdminController ...@@ -366,9 +366,9 @@ class NoDoneTaskController extends AdminController
// }); // });
//保存后回调 //保存后回调
$form->saved(function (Form $form) { $form->saved(function (Form $form) {
$start = 'src="'; $start = 'src="';
$end = '" alt'; $end = '" alt';
ini_set('pcre.backtrack_limit', '2097152');
$pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/'; $pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/';
preg_match_all($pattern, $form->input('collects.net_img'), $matches); preg_match_all($pattern, $form->input('collects.net_img'), $matches);
$images = ''; $images = '';
...@@ -404,13 +404,13 @@ class NoDoneTaskController extends AdminController ...@@ -404,13 +404,13 @@ class NoDoneTaskController extends AdminController
$no = DB::table('tasks_receives as a') $no = DB::table('tasks_receives as a')
->leftJoin('tasks as b','a.task_id','=','b.id') ->leftJoin('tasks as b','a.task_id','=','b.id')
->where('a.id', '!=', $this->id) ->where('a.id', '!=', $this->id)
->where('a.user_id', (Admin::user())->id) ->where('a.user_id', (Admin::user())->id)
->where('a.status', 0) ->where('a.status', 0)
->orderBy('b.city_id','desc') ->orderBy('b.city_id','desc')
->orderBy('b.year','desc') ->orderBy('b.year','desc')
->get(['a.id','b.name','b.city_id','b.year'])->toArray(); ->get(['a.id','b.name','b.city_id','b.year'])->toArray();
// dd($no[0]->id,$no); // dd($no[0]->id,$no);
if ($no) { if ($no) {
......
...@@ -239,6 +239,7 @@ class TasController extends AdminController ...@@ -239,6 +239,7 @@ class TasController extends AdminController
$start = 'src="'; $start = 'src="';
$end = '" alt'; $end = '" alt';
$pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/'; $pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/';
ini_set('pcre.backtrack_limit', '2097152');
preg_match_all($pattern, $form->input('guide'), $matches); preg_match_all($pattern, $form->input('guide'), $matches);
$images = ''; $images = '';
foreach ($matches[1] as $v) { foreach ($matches[1] as $v) {
...@@ -304,6 +305,7 @@ class TasController extends AdminController ...@@ -304,6 +305,7 @@ class TasController extends AdminController
$start = 'src="'; $start = 'src="';
$end = '" alt'; $end = '" alt';
$pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/'; $pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/';
ini_set('pcre.backtrack_limit', '2097152');
preg_match_all($pattern, $param['guide'], $matches); preg_match_all($pattern, $param['guide'], $matches);
$images = ''; $images = '';
foreach ($matches[1] as $v) { foreach ($matches[1] as $v) {
......
...@@ -334,6 +334,7 @@ class TaskController extends AdminController ...@@ -334,6 +334,7 @@ class TaskController extends AdminController
$start = 'src="'; $start = 'src="';
$end = '" alt'; $end = '" alt';
$pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/'; $pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/';
ini_set('pcre.backtrack_limit', '2097152');
preg_match_all($pattern, $form->input('guide'), $matches); preg_match_all($pattern, $form->input('guide'), $matches);
$images = ''; $images = '';
foreach ($matches[1] as $v) { foreach ($matches[1] as $v) {
...@@ -395,6 +396,7 @@ class TaskController extends AdminController ...@@ -395,6 +396,7 @@ class TaskController extends AdminController
$start = 'src="'; $start = 'src="';
$end = '" alt'; $end = '" alt';
$pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/'; $pattern = '/' . preg_quote($start) . '(.*?)' . preg_quote($end) . '/';
ini_set('pcre.backtrack_limit', '2097152');
preg_match_all($pattern, $param['guide'], $matches); preg_match_all($pattern, $param['guide'], $matches);
$images = ''; $images = '';
foreach ($matches[1] as $v) { foreach ($matches[1] as $v) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment