标签:bst sub html dom foreach imp array text and
<?php
header(‘content-type:text/html;charset=utf-8‘);
// array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
foreach (range(0, 12) as $number) {
echo $number;
}
echo "<br/>";
print_r(range(0,9));
echo "<br/>";
print_r(range("a","z")) ;
echo "<br/>";
print_r(range("A","Z")) ;
echo "<br/>";
$text=implode(range(0,9));
$text.=implode(range("a","z"));
$text.=implode(range("A","Z"));
$text=str_shuffle($text);
$text=substr($text,0,5);
echo $text;
echo "<br/>";
//openssl_random_pseudo_bytes($length)
$str=openssl_random_pseudo_bytes(5);
var_dump($str);
print_r($str);
echo "<br/>";
echo implode(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12));
//用来生成验证码
标签:bst sub html dom foreach imp array text and
原文地址:https://www.cnblogs.com/nfyx/p/10484745.html