这是我的代码。但是 while 循环中的 read(): 似乎并没有按顺序对我的结果进行排序。有没有办法对我的结果进行排序?tks 塞比
<?php
$save_path_folder_images = '../simplegallery/users/'.$_SESSION['user_id'].' /'.$_REQUEST['gal_folder'].'/thumbs/';
$save_path_folder_images_full = '/simplegallery/users/'.$_SESSION['user_id'].'/'.$_REQUEST['gal_folder'].'/slides/';
$folder=dir($save_path_folder_images);
$counter = 1;
while($folderEntry=$folder->read())
{
if($folderEntry!="." && $folderEntry!="..")
{?>
<div class="imgs" >
<div class="thumb" >
<label for="img<?php echo $counter; ?>"><img class="img" src="<?php echo $save_path_folder_images.$folderEntry; ?>" /></label>
</div>
<div class="inner">
<input type="checkbox" class="chk " id="img<?php echo $counter; ?>" name="img_name[]" value="<?php echo $save_path_folder_images_full.$folderEntry; ?>" />
</div>
</div>
<?php
$counter++;
}
}
?>