php 随机生成10位字符代码

2015-01-24信息快讯网
function randStr($len) 
{ 
$chars='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; // characters to build the password from 
$string=''; 
for(;$len>=1;$len--) 
{ 
$position=rand()%strlen($chars); 
$string.=substr($chars,$position,1); 
} 
return $string; 
} 
echo randStr(10)."<br>"; 


Notice: Undefined index: page in E:\PHP\test.php on line 14
smarty中先strip_tags过滤html标签后truncate截取文章运用
PHP类中Static方法效率测试代码
POSIX 风格和兼容 Perl 风格两种正则表达式主要函数的类比(preg_match, preg_replace, ereg, ereg_replace)
windows中PHP5.2.14以及apache2.2.16安装配置方法第1/2页
PHPnow安装服务[apache_pn]失败的问题的解决方法
php中使用ExcelFileParser处理excel获得数据(可作批量导入到数据库使用)
使用VisualStudio开发php的图文设置方法
利用Memcached在php下实现session机制 替换PHP的原生session支持
php checkbox 取值详细说明
PHP Stream_*系列函数
PHP中的string类型使用说明
PHP STRING 陷阱原理说明
php下使用strpos需要注意 === 运算符
《Head First 设计模式》代码之PHP版(面向对象学习)第1/2页
PHP XML error parsing SOAP payload on line 1
php strstr查找字符串中是否包含某些字符的查找函数
PHP调用Twitter的RSS的实现代码
PHP获取类中常量,属性,及方法列表的方法
php SQL之where语句生成器
php Try Catch异常测试
php array_intersect()函数使用代码
php strtotime 函数UNIX时间戳
php str_pad 函数使用详解
Google PR查询接口checksum新算法第1/2页
Zend Studio for Eclipse的java.lang.NullPointerException错误的解决方法
Zend Studio 无法启动的问题解决方法
Apache+php+mysql在windows下的安装与配置图解(最新版)
PHP strtr() 函数使用说明
php下HTTP Response中的Chunked编码实现方法
Linux下 php5 MySQL5 Apache2 phpMyAdmin ZendOptimizer安装与配置[图文]
PHP中str_replace函数使用小结
php preg_match_all结合str_replace替换内容中所有img
php htmlentities和htmlspecialchars 的区别
用PHP读取RSS feed的代码
利用PHP和AJAX创建RSS聚合器的代码
©2014-2024 dbsqp.com