This commit is contained in:
icret
2022-07-10 22:48:21 +08:00
parent 313ce88a64
commit c6cd45425c
144 changed files with 355 additions and 134 deletions

4
application/function.php Normal file → Executable file
View File

@@ -245,6 +245,10 @@ function imgName($source = null)
// crc32加密微秒 例2495551279
return crc32(microtime());
break;
case "snowflake":
include __DIR__ . '/class.snowflake.php';
return SnowFlake::createOnlyId(); //分布式id
break;
default:
// 将上传时间+随机数转换为36进制 例vx77yu
return base_convert(date('His') . mt_rand(1001, 9999), 10, 36);