我有以下代码
// 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显示它们。到目前为止,它只能在文件夹中显示一个图像。任何人都知道如何解决这个问题?