Jump to content

Displaying images from a folder


MPT

Recommended Posts

Hi there,

I'm very new with PHP so I hope my question has all information needed for an acucrate response. I will also link the page to show what I have done already if that is permitted (I dont want it to come off as advertising)

Here's what im trying to accomplish:

I have created a page that will allow a user to upload image files to designated folders. I want to make it where all files in those folders are able to be displayed one at a time with a Beginning, previous, next, last navigation. (<< < > >>) I think I can handle the navigation, but any pointers on how to display images from a folder would be AWESOME!

Also, could a mod let me know if I can display the page I have created already?

Thanks in advance.
Link to comment
https://forums.phpfreaks.com/topic/8470-displaying-images-from-a-folder/
Share on other sites

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Also, could a mod let me know if I can display the page I have created already?[/quote]
Yes you may, You can post it as a screenshot or post a link to your current page. Also you can post your code here too, provided that you use the code blocks ([ code]code here[/code] with out the space in the first code tag).
Thanks Wild,

Here is a link to the page I have already created. Keep in mind that this is only the uploading page. I If you check out the top right corner of each upload panel, there is a link that directs you to the folder where the files are being uploaded. Those folders are the ones I'd like to display as images on another page.

[a href=\"http://www.effluximages.com/testbed/upload2/satstuupload.php\" target=\"_blank\"]upload page link, click here[/a]

Thanks much
dont know if this will be what you're after...
but might help

[code]
<?php
foreach (glob("*.jpg") as $filename)
{
echo "<IMG SRC='$filename' ALT='$filename'><br>";
}
?>
[/code]

this will select all the .jpg files in the directory and display them as an image.
[!--quoteo(post=369258:date=Apr 27 2006, 11:20 AM:name=wisewood)--][div class=\'quotetop\']QUOTE(wisewood @ Apr 27 2006, 11:20 AM) [snapback]369258[/snapback][/div][div class=\'quotemain\'][!--quotec--]
dont know if this will be what you're after...
but might help

[code]
<?php
foreach (glob("*.jpg") as $filename)
{
echo "<IMG SRC='$filename' ALT='$filename'><br>";
}
?>
[/code]

this will select all the .jpg files in the directory and display them as an image.
[/quote]

thats awesome! It would be really cool if each image could be put in a table cell!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.