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