From d265c9b03ffc7e99470af2e254a9ccb3af99f638 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Thu, 12 Dec 2019 17:21:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0-=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=BB=84-=E7=8E=A9=E5=AE=B6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=95=8F=E6=84=9F=E4=BF=A1=E6=81=AF=E5=8A=A0=E5=AF=86=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 0b8423ef2..bcb506d46 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -584,4 +584,16 @@ function getAllGame() { $list = M("game", 'tab_')->field('relation_game_name as game_name')->group('relation_game_name')->select(); return $list; +} + +/** + * 中间加密 替换字符串的子串 + */ +function encryptStr($str) { + $length = strlen($str); + $stars_str = ""; + for ($x=0; $x<=$length-6; $x++) { + $stars_str = $stars_str."*"; + } + return substr_replace($str, $stars_str, 3, $length-6); } \ No newline at end of file