zoukankan      html  css  js  c++  java
  • 字符串,验证码

    <?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));
    //用来生成验证码

  • 相关阅读:
    2021/4/6
    2021/4/5
    2021/4/2
    2021/4/1
    2021/3/31
    2021/3/30
    2021/3/29重构
    总结
    js 座机正则
    uni-app 条件编译
  • 原文地址:https://www.cnblogs.com/nfyx/p/10484745.html
Copyright © 2011-2022 走看看