From 0b7a6e889c0b7811ada97539e530a35fd9fe9dc9 Mon Sep 17 00:00:00 2001 From: zhaoxiang Date: Fri, 20 Jul 2018 12:08:22 +0800 Subject: [PATCH] =?UTF-8?q?modified=20=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=80=A7=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/InterfaceList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/admin/controller/InterfaceList.php b/application/admin/controller/InterfaceList.php index 7faf180..8785614 100644 --- a/application/admin/controller/InterfaceList.php +++ b/application/admin/controller/InterfaceList.php @@ -184,7 +184,7 @@ class InterfaceList extends Base { $tplStr = file_get_contents($tplPath); $listInfo = AdminList::all(['status' => 1]); foreach ($listInfo as $value) { - $tplStr .= 'Route::rule(\'api/' . $value->hash . '\',\'api/' . $value->apiClass . '\', \'' . $methodArr[$value->method] . '\', [\'after_behavior\' => $afterBehavior]);'; + $tplStr .= 'Route::rule(\'api/' . addslashes($value->hash) . '\',\'api/' . addslashes($value->apiClass) . '\', \'' . $methodArr[$value->method] . '\', [\'after_behavior\' => $afterBehavior]);'; } file_put_contents($apiRoutePath, $tplStr);