From c446c6dfbeb3673b78a3af6ef2c44b7559ff1b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 7 Sep 2020 11:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Process/ServerInotify.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 92384f4e..4f534418 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -130,9 +130,8 @@ class ServerInotify extends Process if ($ev['mask'] == IN_IGNORED || !in_array($ev['mask'], $eventList)) { continue; } - $fileType = strstr($ev['name'], '.'); //非重启类型 - if ($fileType !== '.php') { + if (strstr($ev['name'], '.') !== '.php') { continue; } @@ -212,7 +211,7 @@ class ServerInotify extends Process $files = scandir($dir); foreach ($files as $f) { - if ($f == '.' || $f == '..' || $f == 'runtime' || !preg_match('/\.php$/', $f)) { + if ($f == '.' || $f == '..' || $f == 'runtime' || !preg_match('/.*\.php/', $f)) { continue; } $path = $dir . '/' . $f;