From 55c9922a49341972feb228373e7cb0049bacf1d2 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 9 Feb 2023 09:14:17 +0000 Subject: [PATCH] * Fix error for php5.3. --- framework/base/helper.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/framework/base/helper.class.php b/framework/base/helper.class.php index acec227494..2450a51965 100644 --- a/framework/base/helper.class.php +++ b/framework/base/helper.class.php @@ -998,3 +998,18 @@ if(!function_exists('array_column')) return $output; } } + +if (!function_exists('getallheaders')) { + function getallheaders() + { + $headers = array(); + foreach ($_SERVER as $name => $value) + { + if (substr($name, 0, 5) == 'HTTP_') + { + $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; + } + } + return $headers; + } +} \ No newline at end of file