我使用类似于 http://tympanus.net/codrops/2010/05/23/fresh-sliding-thumbnails-gallery-with-jquery-php 的幻灯片,我希望显示文件夹的每个图像,而不是像我试图学习PHP一样下拉.....请帮忙
首先:这是一个非常具体的问题。发布您的代码?你试了什么?
但是:关于您的标题"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 );