Call up images in a folder: NEWBIE

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Call up images in a folder: NEWBIE

    Hi all, I was interested in calling up all the images in a specific file
    path and display them in rows and also hyperlink them to specific pages.
    What is the easiest way to start this? Thanks so much in advance. - Mikey P.

    phatnugs420@comcast.net Guest

  2. Similar Questions and Discussions

    1. Save images in a new folder
      I have Contribute 3 and I want to save the images of an html document that I'm publishing in a specific folder (not in the "images" folder as...
    2. Displaying images from a folder
      I'm trying to display all the images in a particular folder. I'm using this cfdirectory: <cfset thisPath = "\\daytona\cflr\images\vehicle\" &...
    3. Temp Images Folder
      When I open indesign, a windows folder appears on my desktop entitled TempImages. I try to delete it but it pops back up each time I open the...
    4. DW doesnt map the FW images to the right folder.
      I make most pages in FW, and export to DW. Basically, when i use FW HTML in a layer, the Src doesnt say the folder that i've indicated the FW html...
    5. How to protect your Images folder?
      If image is shown in the browser then client already has a copy of it. Therefore, it can save it to a disk file. Disabling directory browsing...
  3. #2

    Default Re: Call up images in a folder: NEWBIE



    <phatnugs420@comcast.net> wrote in message
    news:BD7CEDE2.88ED%phatnugs420@comcast.net...
    > Hi all, I was interested in calling up all the images in a specific file
    > path and display them in rows and also hyperlink them to specific pages.
    > What is the easiest way to start this? Thanks so much in advance. - Mikey
    P.
    >
    <phatnugs420@comcast.net> wrote in message
    news:BD7CEDE2.88ED%phatnugs420@comcast.net...
    > Hi all, I was interested in calling up all the images in a specific file
    > path and display them in rows and also hyperlink them to specific pages.
    > What is the easiest way to start this? Thanks so much in advance. - Mikey
    P.
    >

    $path="image/";
    $dp=opendir($path);
    while($file=readdir($dp)) {
    if($file!=".." AND $file!=".") echo "<a href='dunno.php'><img
    src='$file'></a>";
    }

    Untested but should do it.
    Regards
    Richard Grove
    [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems


    Richard Grove - ®ed Eye Media Guest

  4. #3

    Default Re: Call up images in a folder: NEWBIE

    Nothing to add to Richards sollution.

    Most of the time when I work with pictures, I use GDLib as well for
    automatically making thumbnails etc. Don't know if it is any use for
    you, but I think you should check it out!

    more info at [url]http://nl3.php.net/manual/en/ref.image.php[/url]


    Richard Grove - ®ed Eye Media wrote:
    > <phatnugs420@comcast.net> wrote in message
    > news:BD7CEDE2.88ED%phatnugs420@comcast.net...
    >
    >>Hi all, I was interested in calling up all the images in a specific file
    >>path and display them in rows and also hyperlink them to specific pages.
    >>What is the easiest way to start this? Thanks so much in advance. - Mikey
    >
    > P.
    >
    >
    > <phatnugs420@comcast.net> wrote in message
    > news:BD7CEDE2.88ED%phatnugs420@comcast.net...
    >
    >>Hi all, I was interested in calling up all the images in a specific file
    >>path and display them in rows and also hyperlink them to specific pages.
    >>What is the easiest way to start this? Thanks so much in advance. - Mikey
    >
    > P.
    >
    >
    >
    > $path="image/";
    > $dp=opendir($path);
    > while($file=readdir($dp)) {
    > if($file!=".." AND $file!=".") echo "<a href='dunno.php'><img
    > src='$file'></a>";
    > }
    >
    > Untested but should do it.
    > Regards
    > Richard Grove
    > [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems
    >
    >
    Harrie Verveer Guest

  5. #4

    Default Re: Call up images in a folder: NEWBIE

    > Nothing to add to Richards sollution.
    >
    > Most of the time when I work with pictures, I use GDLib as well for
    > automatically making thumbnails etc. Don't know if it is any use for
    > you, but I think you should check it out!
    >
    > more info at [url]http://nl3.php.net/manual/en/ref.image.php[/url]
    >
    >
    Don't you think it's rude when a person asking for help can't even be arsed
    to reply?

    Regards
    Richard Grove
    [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems


    Richard Grove - ®ed Eye Media Guest

  6. #5

    Default Re: Call up images in a folder: NEWBIE

    What I was trying to say is that your post already covered it al - it
    simply is THE way. My post was more intended to give an extra tip to a
    newbie (at least that what he calles himself). I which I found out about
    gdlib long before I did - it makes life a lot easier :).

    Sorry if I offended you - but it doesn't really matter as long as
    phatnugs is happy :P

    Richard Grove - ®ed Eye Media wrote:
    >>Nothing to add to Richards sollution.
    >>
    >>Most of the time when I work with pictures, I use GDLib as well for
    >>automatically making thumbnails etc. Don't know if it is any use for
    >>you, but I think you should check it out!
    >>
    >>more info at [url]http://nl3.php.net/manual/en/ref.image.php[/url]
    >>
    >>
    >
    >
    > Don't you think it's rude when a person asking for help can't even be arsed
    > to reply?
    >
    > Regards
    > Richard Grove
    > [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems
    >
    >
    Harrie Verveer Guest

  7. #6

    Default Re: Call up images in a folder: NEWBIE

    news:BqidnQ_4J8hQwsTcRVnyug@zeelandnet.nl...
    > What I was trying to say is that your post already covered it al - it
    > simply is THE way. My post was more intended to give an extra tip to a
    > newbie (at least that what he calles himself). I which I found out about
    > gdlib long before I did - it makes life a lot easier :).
    >
    > Sorry if I offended you - but it doesn't really matter as long as
    > phatnugs is happy :P
    >
    > Richard Grove - ®ed Eye Media wrote:
    > >>Nothing to add to Richards sollution.
    > >>
    > >>Most of the time when I work with pictures, I use GDLib as well for
    > >>automatically making thumbnails etc. Don't know if it is any use for
    > >>you, but I think you should check it out!
    > >>
    > >>more info at [url]http://nl3.php.net/manual/en/ref.image.php[/url]
    > >>
    > >>
    > >
    > >
    > > Don't you think it's rude when a person asking for help can't even be
    arsed
    > > to reply?
    > >
    > > Regards
    > > Richard Grove
    > > [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems
    > >
    > >
    You didn't offend me, the person asking the question did by not replying.

    Regards
    Richard Grove
    [url]http://www.redeyemedia.co.uk[/url]
    [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems
    +44 (0) 1892 546979


    Richard Grove - ®ed Eye Media Guest

  8. #7

    Default Re: Call up images in a folder: NEWBIE

    he didn't reply on your post either :P

    Richard Grove - ®ed Eye Media wrote:
    > news:BqidnQ_4J8hQwsTcRVnyug@zeelandnet.nl...
    >
    >>What I was trying to say is that your post already covered it al - it
    >>simply is THE way. My post was more intended to give an extra tip to a
    >>newbie (at least that what he calles himself). I which I found out about
    >>gdlib long before I did - it makes life a lot easier :).
    >>
    >>Sorry if I offended you - but it doesn't really matter as long as
    >>phatnugs is happy :P
    >>
    >>Richard Grove - ®ed Eye Media wrote:
    >>
    >>>>Nothing to add to Richards sollution.
    >>>>
    >>>>Most of the time when I work with pictures, I use GDLib as well for
    >>>>automatically making thumbnails etc. Don't know if it is any use for
    >>>>you, but I think you should check it out!
    >>>>
    >>>>more info at [url]http://nl3.php.net/manual/en/ref.image.php[/url]
    >>>>
    >>>>
    >>>
    >>>
    >>>Don't you think it's rude when a person asking for help can't even be
    >
    > arsed
    >
    >>>to reply?
    >>>
    >>>Regards
    >>>Richard Grove
    >>>[url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems
    >>>
    >>>
    >
    >
    > You didn't offend me, the person asking the question did by not replying.
    >
    > Regards
    > Richard Grove
    > [url]http://www.redeyemedia.co.uk[/url]
    > [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems
    > +44 (0) 1892 546979
    >
    >
    Harrie Verveer Guest

  9. #8

    Default Re: Call up images in a folder: NEWBIE

    oh damn I get it, haha sorry! :P

    Maybe phatnugs just doesn't visit the newsgroup very often and still has
    to reply?

    Harrie Verveer wrote:
    > he didn't reply on your post either :P
    >
    > Richard Grove - ®ed Eye Media wrote:
    >
    >> news:BqidnQ_4J8hQwsTcRVnyug@zeelandnet.nl...
    >>
    >>> What I was trying to say is that your post already covered it al - it
    >>> simply is THE way. My post was more intended to give an extra tip to a
    >>> newbie (at least that what he calles himself). I which I found out about
    >>> gdlib long before I did - it makes life a lot easier :).
    >>>
    >>> Sorry if I offended you - but it doesn't really matter as long as
    >>> phatnugs is happy :P
    >>>
    >>> Richard Grove - ®ed Eye Media wrote:
    >>>
    >>>>> Nothing to add to Richards sollution.
    >>>>>
    >>>>> Most of the time when I work with pictures, I use GDLib as well for
    >>>>> automatically making thumbnails etc. Don't know if it is any use for
    >>>>> you, but I think you should check it out!
    >>>>>
    >>>>> more info at [url]http://nl3.php.net/manual/en/ref.image.php[/url]
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>> Don't you think it's rude when a person asking for help can't even be
    >>
    >>
    >> arsed
    >>
    >>>> to reply?
    >>>>
    >>>> Regards
    >>>> Richard Grove
    >>>> [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems
    >>>>
    >>>>
    >>
    >>
    >> You didn't offend me, the person asking the question did by not replying.
    >>
    >> Regards
    >> Richard Grove
    >> [url]http://www.redeyemedia.co.uk[/url]
    >> [url]http://www.shopmaker.co.uk[/url] - UK Ecommerce Shop Systems
    >> +44 (0) 1892 546979
    >>
    >>
    Harrie Verveer Guest

  10. #9

    Default Re: Call up images in a folder: NEWBIE

    in article [email]8-idnR68j5ZE5cfcRVnyuQ@zeelandnet.nl[/email], Harrie Verveer at
    newsgroup{remove-this}@harrieverveer.com wrote on 9/29/04 3:54 AM:
    > oh damn I get it, haha sorry! :P
    >
    > Maybe phatnugs just doesn't visit the newsgroup very often and still has
    > to reply?
    Wow :) what did I start here :) and you are correct I didn't visit it in a
    timely manner. I apologize I was out of town... But the first response
    worked great! Thanks so much.. Hope now everyone has breathed a sigh of
    relief since I'm posting :)... J/k :) Again thanks so much for your response
    and all your help.

    phatnugs420@comcast.net Guest

  11. #10

    Default Re: Call up images in a folder: NEWBIE

    > $path="image/";
    > $dp=opendir($path);
    > while($file=readdir($dp)) {
    > if($file!=".." AND $file!=".") echo "<a href='dunno.php'><img
    > src='$file'></a>";
    > }
    wow, that's neat! I'm trying to do roughly the same thing, and (being a
    beginner), I'm messing about with arrays, '$maximageid', etc. This is much
    more efficient. I just have a couple of questions for complete
    understanding. Hope you don't mind.

    It looks like the opendir() and the readdir() provide an array or list of
    values, and the while loop means 'do this for each of the list of values'.
    with ".." and "." being the only ones that aren't images. Is that right?

    I want to make galleries with a large number of images (maybe 150-200) and I
    don't want the user to wait for all those thumbnails, so I'm trying to split
    the gallery up into pages of 20. I'm thinking of dividing the number of
    images by 20 and making an array of filenames for each page, or just
    specifying a $firstimage variable, and displaying the next 20 (I don't mind
    if someone manually puts an odd number in the URL). Would you recommend
    either approach, or neither?! I don't really want to implement a complicated
    off-the-shelf system, I prefer a simple efficient one.

    Thanks for any comments from anyone!


    Martin Bishop Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139