我正在使用类似于http://tympanus.net/codrops/2010/05/23/fresh-sliding-thumbnails-gallery-with-jquery-php的幻灯片,我希望显示文件夹的每个图像而不是下拉,因为我正在尝试学习PHP .....请帮忙
答案 0 :(得分:1)
首先:这是一个非常具体的问题。发布你的代码?你尝试了什么?
但是:关于你的标题"How to select images from a folder?"
,请从这里开始:
<?php
$directory = '.'; // your directory
$files = scandir( $directory );
$images = array();
foreach( $files as $file )
{
$attributes = getimagesize( $file );
if( $attributes )
{
array_push( $images, $file );
}
}
// An array with your images
print_r( $images );