随机获取文件夹下的图片
随机获取文件夹下的图片PHP代码public function getranduserimg() { $img_array = glob($_SERVER['DOCUMENT_ROOT']."/uploads/headportrait/*.{gif,jpg,png}", GLOB_BRACE); $imgarr = []; for ($i=0; $i<30; $i++) { $img = array_rand($im
原创
2021-08-19 20:02:38 ·
488 阅读 ·
0 评论