From 579e58522c83dfc2fe54f3d0fc225ef12091b269 Mon Sep 17 00:00:00 2001
From: heyuntao <heyuntao@LAPTOP-MP4HD5NS>
Date: 星期六, 07 十月 2023 10:57:34 +0800
Subject: [PATCH] no message

---
 application/common.php |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/application/common.php b/application/common.php
index 4b40bc2..366e57d 100644
--- a/application/common.php
+++ b/application/common.php
@@ -516,7 +516,26 @@
         return $icon;
     }
 }
+ function guid()
+{
 
+    if (function_exists('com_create_guid')) {
+
+        return com_create_guid();
+
+    } else {
+
+        mt_srand((double)microtime() * 10000);
+        $charid = strtoupper(md5(uniqid(rand(), true)));
+        $uuid = substr($charid, 0, 8)
+            . substr($charid, 8, 4)
+            . substr($charid, 12, 4)
+            . substr($charid, 16, 4)
+            . substr($charid, 20, 12);
+        return $uuid;
+
+    }
+}
 
 function create_guid() { 
     return time().mt_rand(10000,99999);

--
Gitblit v1.9.3