• Loading and displaying all images from a directory
    10 replies, posted
I am working on my blog and before i launch it i want to get my image section up and running. All i want it to do is display every single image in the folder it is linked to which is just images. I know i need to use php but i just learned it and i am not really sure how i will set this up. i want to display it in a certain size so that it will fit in this nice little table i am making :] So you guys any help? ^^
-snip-
I'll start you off, grab all the images like so: [php]glob( '*.png,*.jpg,*.gif', GLOB_BRACE );[/php] [url]http://php.net/manual/en/function.glob.php[/url]
If you're into videos: [url]http://www.youtube.com/watch?v=dHq1MNnhSzU[/url]
[QUOTE=Known Havok;32472271]If you're into videos: [url]http://www.youtube.com/watch?v=dHq1MNnhSzU[/url][/QUOTE] I tried that video nothing shows up... [php] <?php $dir = 'images'; $file_display = array('jpg','jpeg','png','gif'); if(is_dir($dir) == false) { echo "What the HECKSSSS, Files are not found?!?"; } else { echo "found"; } ?> [/php]
Does "found" appear when you run the code? You still need to grab and display the images in that directory.
[QUOTE=Kamern;32476126]Does "found" appear when you run the code? You still need to grab and display the images in that directory.[/QUOTE] I know that but nothing at all shows.... Its just a blank white page :/
[QUOTE=gameguysz;32476165]I know that but nothing at all shows.... Its just a blank white page :/[/QUOTE] Link please.
[QUOTE=Kamern;32476175]Link please.[/QUOTE] Its local for now until i finish my site
[QUOTE=gameguysz;32476207]Its local for now until i finish my site[/QUOTE] Do you have PHP on your computer?
[QUOTE=Kamern;32476221]Do you have PHP on your computer?[/QUOTE] lolololololol i uploaded it for a second now things are starting to show up XD i forgot i just bought a new laptop :P Everything works now guys thanks ^^
Sorry, you need to Log In to post a reply to this thread.