我有以下代码
// Define the full path to your folder from root
$path = "../galleries/".$album;
// Open the folder
$dir_handle = @opendir($path) or die("Unable to open $path");
// Loop through the files
while ($file = readdir($dir_handle)) {
if(strlen($file)>1){echo "<a href='http://minification.com/?page_id=32&dir=$album&img=$file'><img src='http://minification.com/galleries/$album/$file'></a>";}
}
// Close
closedir($dir_handle);
我想要做的是从一个文件夹中提取所有图像并使用 PHP 显示它们。到目前为止,它的工作一直到只显示文件夹中的一张图像。有人知道怎么修这个东西吗?