本文主要是介绍PHP实现生成唯一会员卡号 数字卡号转换,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.代码实现
<?php
/*** Created by PhpStorm.* User: aysen* Mail: 122195562@qq.com* Date: 2020/11/2* Time: 10:01*/
class NumberCardConversion
{// 进制数private static $dnum = 36;// 前缀值private static $pre = 'sy';// 验长度private static $vc_len = 2;// 密码字典private static $cipherDic = [0 =>'0', 1 =>'1', 2 =>'2', 3 =>'3', 4 =>'4', 5 =>'5', 6 =>'6', 7 =>'7', 8 =>'8',9 =>'9', 10 =>'A', 11 =>'B', 12 =>'C', 13 =>'D', 14 =>'E', 15 =>'F', 16 =>'G', 17 =>'H',18 =>'I', 19 =>'J', 20 =>'K', 21 =>'L', 22 =>'M', 23 =
这篇关于PHP实现生成唯一会员卡号 数字卡号转换的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!