php自定义函数get_folder_files用于随机获取目录下的随机文件
function get_folder_files($folder)
{$fp = opendir($folder);
while (false != $file = readdir($fp))
{
if ($file != '.'&&$file != '..')
{
$file = "$file";
$arr_file[] = $file;
}
}
closedir($fp);
return $arr_file;
}
配合mt_rand可以发挥无限威力