当前位置:网站首页>PHP generate order number
PHP generate order number
2022-06-26 12:23:00 【ζ He Yiyi】
function createOrderNo()
{
try {
$order_no =
date('d')
. random_int(0, 9)
. date('m')
. random_int(0, 9)
. date('y')
. random_int(0, 9)
. date('i')
. random_int(0, 9)
. date('H')
. random_int(0, 9)
. date('s')
. random_int(0, 9);
$msg = 'success';
} catch (\Exception $e) {
$order_no = '';
$msg = $e->getMessage();
}
if (empty($order_no)) {
new Exception($msg);
}
return $order_no;
}
边栏推荐
- This executeQuery (SQL) cannot compile classes for JSP. What is the reason?
- Mqtt disconnect and reconnect
- Question B of 2016 Sichuan Ti Cup Electronic Design Competition
- Redis cannot connect to the server through port 6379
- Microservice governance (nocas)
- Comparison of latest mobile phone processors in 2020 (with mobile phone CPU ladder diagram)
- Investment planning and forecast report on the future direction of China's smart agriculture during the 14th five year plan (2022)
- 1、 MySQL introduction
- HUST network attack and defense practice | 6_ IOT device firmware security experiment | Experiment 2 MPU based IOT device attack mitigation technology
- Basic principle of MOS tube and important knowledge points of single chip microcomputer
猜你喜欢

JMeter response time and TPS listener tutorial

【Redis 系列】redis 学习十六,redis 字典(map) 及其核心编码结构

Laravel+gatewayworker completes the im instant messaging and file transfer functions (Chapter 4: server debugging errors)

Matlab programming example: how to count the number of elements in a cell array

dried food! Yiwen will show you SD card, TF card and SIM card!
![Random numbers in leetcode 710 blacklist [random numbers] the leetcode path of heroding](/img/58/2a56c5c9165295c830082f8b05dd98.png)
Random numbers in leetcode 710 blacklist [random numbers] the leetcode path of heroding

This executeQuery (SQL) cannot compile classes for JSP. What is the reason?

leetcode 715. Range module (hard)

Omni channel member link - tmall member link 3: preparation of member operation content

Statistical genetics: Chapter 2, the concept of statistical analysis
随机推荐
Statistical genetics: Chapter 1, basic concepts of genome
Ctfshow web getting started command execution web75-77
Is it safe to open an account in the top ten securities app rankings in China
Realize microservice load balancing (ribbon)
Report on in-depth analysis and investment strategy recommendations for China's petroleum coke industry (2022 Edition)
我想知道,股票开户有哪些优惠活动?网上开户是否安全么?
Omnichannel membership - tmall membership 2: frequently asked questions
19: Chapter 3: develop pass service: 2: get through Alibaba cloud SMS service in the program; (it only connects with Alibaba cloud SMS server, and does not involve specific business development)
初探Protostuff的使用[通俗易懂]
Comparison of latest mobile phone processors in 2020 (with mobile phone CPU ladder diagram)
11、 Box styles and user interface
菜鸟实战UML——活动图
Cross platform members get through the two channels of brand Ren Du
Ctrip ticket app KMM cross end kV repository mmkv kotlin | open source
Introduction to Dolby panoramic sound
Which is safer and better for great wisdom to open an account
Five trends of member management in 2022
Omni channel member link - tmall member link 3: preparation of member operation content
File decryption in webgame development
国际美妆业巨头押注中国