简体   繁体   中英

Creating an updating gallery

I'm looking for this to work with video but it could equally work with photos and other multimedia. I'm wanting to create a page with various sections each held in their own div. I then will have a folder where I will upload a still from the video, the video itself and the title and description in different files. I then want each div to go into this folder and select the last uploaded files and display them. You will then be able to click on the div and it will open up another page with the title, description and video. I have been searching around but think that my request is too specific to try and find an answer. I'm guessing that I will need to use php somewhere along the way such as selecting the folder and getting the last uploaded files but am unsure what else and even how to build everything else. I'd be grateful of any information you could give.

This is a simple approach to list images from a gallery by their modification time:

$images = glob("gallery/*.jpeg");
$images = array_combine($images, $images);
$images = array_map("filemtime", $images);
arsort($images);
print_r(array_keys($images));

Though you would need some more code to pretty print that.

If you are actually looking for code or some ready-made script, then there's "PHP Gallery" I think.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM