很简单,直接上代码:
<?php header('Content-type: image/jpg'); $img_array = glob("./*.{gif,jpg,png}",GLOB_BRACE); $img = array_rand($img_array); $image = file_get_contents($img_array[$img]); echo $image;
很简单,直接上代码:
<?php header('Content-type: image/jpg'); $img_array = glob("./*.{gif,jpg,png}",GLOB_BRACE); $img = array_rand($img_array); $image = file_get_contents($img_array[$img]); echo $image;