Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: image loading

  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Location
    springfield, mo
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question image loading

    i have like 983462364 images and i want them all on one page but i dont want to have to type out the image tag every time so cant i make it so that i put the images ina folder and it will just add it to the page?

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,084
    Thanks
    11
    Thanked 99 Times in 97 Posts
    that's gonna take a long time to dislay

    PHP Code:
    $d dir("images");
    while (
    false !== ($entry $d->read())) {
    if(
    substr($entry,-3,3)=='gif' || substr($entry,-3,3)=='jpg'){
    echo 
    "<img src=\"$d->path.$entry\"><br />";
    }
    }
    $d->close(); 
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •