<?php
function generate_code($length = 4) {
return rand(pow(10,($length-1)), pow(10,$length)-1);
} echo generate_code();
相关文章
- PHP get_class_methods函数用法
- 如何使用 TP中的公共函数 (定义在common/common.php中的函数)
- jQuery的$.get()函数不执行以及php端报错Uncaught Error: Call to a member function bind_param() on boolean in...
- 比较好用的php函数
- PHP $_FILES函数详解
- PHP array_intersect() 函数
- PHP mysql_num_rows() 函数 返回结果集中行的数目。
- php __autoload函数 加载类文件
- php对象:__autoload()函数及单入口文件,__set(), __get(), get_class_methods(),get_class_vars()
- php动态获取函数参数