//0开头的数字递增
public function autoInc($num,$step=1){
$count=count(str_split($num));
$num_new=intval($num)+$step;
if($num_new>pow(10,$count-1)){
return $num_new;
}else{
return str_pad($num_new,$count,'0',STR_PAD_LEFT);
}
}
0开头的数字递增
最新推荐文章于 2022-07-06 15:11:27 发布