I am new to php. I currently only have one goal for learning php. that is to build a web site for sharing pictures with my family. so here is my questions.
Is there a way to have php look at the contents of a folder and display the images dynamically? What I mean by dynamically is i don't want to upload pics via a web interface. I want to ftp pics to a folder and have the page display the contents of the folder. I know there are details I will need to look into to actually get this to work. I just want to know if it is possible and where i should start. I hope this make sense. I have a lot of pic and the past solutions i have tried required me to upload pics individually.
viewing pictures
Moderator: General Moderators
Try Coppermine (http://coppermine-gallery.net/). It allows you to upload a bunch of photos at once in a zip file, then it handles the rest.
It uses PHP/MySQL.
Of course if you want to do it yourself, it isn't hard to list the files in a directory and display the output in <img> tags.
see http://ca3.php.net/readdir for some examples of reading the files in directory.
-Steve
It uses PHP/MySQL.
Of course if you want to do it yourself, it isn't hard to list the files in a directory and display the output in <img> tags.
see http://ca3.php.net/readdir for some examples of reading the files in directory.
-Steve
Gallery is another and (I believe) more popular image gallery program: http://gallery.menalto.com/ . One of the nice things about Coppermine or Gallery is the fact that they do thumbnails for your for easier browsing. If you're just new to this whole thing, do a Google for "PHP gallery program" or something along those lines. Gallery is quite a large program, so you might be able to find something more lightweight for your needs.
However, ~shannah is correct - it will be fairly trivial to just do a raw dump of the images to the screen, if you're more interested in doing it yourself.
However, ~shannah is correct - it will be fairly trivial to just do a raw dump of the images to the screen, if you're more interested in doing it yourself.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
-
packetsmacker
- Forum Newbie
- Posts: 5
- Joined: Mon Oct 15, 2007 12:05 pm