header('x-forwarded-for', false); if ($ip1) { $arr = explode(",", $ip1); if(count($arr)>0){ return trim($arr[0]); } } return request()->ip(); } function plugins_path($path=''): string { if (mb_strlen($path) > 0) { if (strpos($path, "/") == 0) { return $_ENV['plugins_dir_name'] . $path; } return $_ENV['plugins_dir_name'] . '/' . $path; } return $_ENV['plugins_dir_name'] . "/"; } function is_demo_mode($is_exit = false) { if (env('demo_mode')) { if ($is_exit) { json(["msg" => "演示模式,部分功能受限,禁止更新或删除!", "code" => 0])->send(); exit(); } return true; } return false; }