当前位置:网站首页>随机生成数字字母(大写)组合
随机生成数字字母(大写)组合
2022-06-10 09:52:00 【u011042325】
公共函数(common.php)中书写方法:
/**
* 随机生成数字字母(大写)组合
* @param $len 长度
*/
if (!function_exists('getRandomString'))
{
function getRandomString($len, $chars=null)
{
if (is_null($chars)) {
$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
}
mt_srand(10000000*(double)microtime());
for ($i = 0, $str = '', $lc = strlen($chars)-1; $i < $len; $i++) {
$str .= $chars[mt_rand(0, $lc)];
}
return $str;
}
}
边栏推荐
- 聯調這夜,我把同事打了...
- Written examination for job hunting
- Notes to docker advanced chapter (7) steps to build a redis three master and three slave cluster case in docker
- 你的下一台电脑何必是电脑,探索不一样的远程操作
- What should we pay attention to when developing, designing and building the reward task source code
- “胡说八道” DATABASE 主键设计
- 成都自控开发_单片机程序的一般开发流程是怎样
- What are the tools and software needed for SCM development
- 416. segmentation and subsets
- R language plot visualization: plot to visualize the box graph, and use the quartilemethod parameter to customize the calculation method of the quantile of the box graph (basic boxplot)
猜你喜欢

【边缘检测】基于matlab八方向sobel图像边缘检测【含Matlab源码 1865期】

Someone used this Tiktok e-commerce marketing method to win an offer with a monthly salary of 2W

416. segmentation and subsets

HMM详细介绍+举例

Flutter:自定义单选按钮

【图像去噪】基于matlab BdCNN图像去噪【含Matlab源码 1866期】

Personnalisation de l'équipement d'essai de Chengdu Introduction préliminaire aux types de données du langage C du micro - ordinateur à puce unique

浏览器禁止缓存讲解

Demand and business model innovation - demand 15- demand specification

你的下一台电脑何必是电脑,探索不一样的远程操作
随机推荐
[edge detection] eight direction Sobel image edge detection based on MATLAB [including Matlab source code 1865]
Learning notes on panoramic segmentation of point cloud
“胡说八道” DATABASE 主键设计
618来袭,大量优惠券生成太耗时?ThreadPoolTaskExecutor线程池帮你来搞定
R语言coin包应用于独立性问题的置换检验(permutation tests)、在同一数据集上使用单向方差分析(one-way ANOVA)和近似的K样本置换检验、比较多个分组的均值是否相同
张小白教你使用OGG实现Oracle 19C到MySQL 5.7的数据同步(3)
Radiolisttile is displayed in row of the shutter
The R language coin package is applied to permutation tests for independence problems, one-way ANOVA and approximate k-sample permutation tests on the same data set, and comparing whether the mean val
无心剑中译拜伦诗4首
图像处理理论和应用
HMM详细介绍+举例
[Blue Bridge Cup training 100 questions] scratch apple is ripe blue bridge cup scratch competition special prediction programming question intensive training simulation exercise question 13
怎么办理艺术品备案?办理艺术品备案要准备哪些材料?
How to send asynchronous requests gracefully in wechat applets?
无心剑中译里尔克《秋日》
Lambda expression
提升.NET技术水平,我是怎么做的
To serve the "nervous system" with a broad and subtle vision
Personnalisation de l'équipement d'essai de Chengdu Introduction préliminaire aux types de données du langage C du micro - ordinateur à puce unique
七、策略模式