PHP生成惟一订单号 阿星小栈

 

/**
*
* uniqid - 官方是这样说的:
* Gets a prefixed unique identifier based on the current time in microseconds.
*/
function build_order_no()
{
    return date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8);
}

 

 

 

 


原文:https://blog.csdn.net/chajinglong/article/details/52598757 ide

相关文章
相关标签/搜索