企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
## 20位随机数 ``` /** * 生成20位随机数 * @param [type] $type [类型,1:订单号,2随机数] * @param integer $num [数量] * @return [type] [字符串] */ function randomCode(){ list($usec, $sec) = explode(" ", microtime()); // 0.78994600 1595664806 $data = explode(".",$usec); $sm = $sec.substr($data[1],0,7); $guid = $sm.mt_rand(100,999); return $guid; } ```