当前位置:网站首页>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;
}
边栏推荐
- HUST网络攻防实践|6_物联网设备固件安全实验|实验二 基于 MPU 的物联网设备攻击缓解技术
- 2022 edition of investment analysis and "fourteenth five year plan" development prospect forecast report of China's switchgear industry
- I want to know how the top ten securities firms open accounts? Is online account opening safe?
- leetcode 715. Range module (hard)
- 4. N queen problem
- How do consumer goods enterprises formulate membership interests?
- Quantitative elementary -- akshare obtains stock code, the simplest strategy
- 证券账户可以开通 开户安全吗
- AD - 将修改后的 PCB 封装更新到当前 PCB 中
- This executeQuery (SQL) cannot compile classes for JSP. What is the reason?
猜你喜欢
The loss of female scientists

Re recognized! Know that Chuangyu has been selected as one of the first member units of the "business security promotion plan"

Scala-day06- pattern matching - Generic

Spark-day03-core programming RDD operator

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

1、 MySQL introduction

TCP interview

"Pinduoduo and short video speed version", how can I roast!

2021 q3-q4 investigation report on the use status of kotlin multiplatform

Scala-day03- operators and loop control
随机推荐
Basic principle of MOS tube and important knowledge points of single chip microcomputer
证券账户一般需要在哪里开通 开户安全吗
I want to know whether flush is a stock market? Is online account opening safe?
[probability theory] conditional probability, Bayesian formula, correlation coefficient, central limit theorem, parameter estimation, hypothesis test
One click deployment of your own community forum
24 database interview questions that must be mastered!
How to prevent weight loss under Gao Bingfa?
Is it safe to open an account in the top ten securities app rankings in China
[solved] data duplication or data loss after laravel paginate() paging
Analysis report on the "fourteenth five year plan" and investment prospect of China's pharmaceutical equipment industry 2022-2028
Apiccloud implements the document download and preview functions
Current situation investigation and investment prospect forecast analysis report of China's electrolytic copper market from 2022 to 2028
[redis series] redis learning 16. Redis Dictionary (map) and its core coding structure
18: Chapter 3: development of pass service: 1: SMS login & registration process, introduction; (SMS verification code is used here)
How do consumer goods enterprises formulate membership interests?
[graduation season · advanced technology Er] I remember the year after graduation
How can we reach members more effectively?
International beauty industry giants bet on China
Leetcode 78. Subset and 90 Subset II
Ctrip ticket app KMM cross end kV repository mmkv kotlin | open source