如何用php 自动生成订单编号呢?这里分享两种方法,大家做个参考。
方法一:
<?php $dingdanhao = date("Y-m-dH-i-s"); $dingdanhao = str_replace("-","",$dingdanhao); $dingdanhao .= rand(1000,999999);
print $dingdanhao; ?>
方法二:
CopyRight © 2010-2021 脚本学堂 Jb200.com , All Rights Reserved.