1,
//随机生成8位数字 function nonceStr() { static $seed = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); $str = ''; for ($i = 0; $i < 6; $i++) { $rand = rand(0, count($seed) - 1); $temp = $seed[$rand]; $str .= $temp; unset($seed[$rand]); $seed = array_values($seed); } return $str; } $nnn = nonceStr(); //随机生成4位数字 // $string = ''; // for ($i = 0; $i < 4; $i++) { // $string .= rand(0, 9); // } $phone = $_GET['phone']; $phone = $_POST['phone'];
php 后端数据返回前端 echo $phone; php打印到前端控制台显示 print_r($arrs);