SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    showing a directory-MAP to a User

    I have an Online Editor where users (after logging in) can edit the texts of webpages online.

    One of the features is adding pictures/images to the text. Now, in order to select the image, I want to enable the user to look inside a map on the server where the images are stored. The images, or locations, are not stored in a database.

    How can this be done?
    How do I create a list of all the files in a designated map on the server?

    For the function I need the URL of the picture. So, what also needs to be done is to export that as well.

    Please advise, any help will be appreciated!

    Jazz
    Last edited by jazztie; Sep 10, 2001 at 15:03.

  2. #2
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By "map" I assume you mean directory. You can use PHP's directory handling commands to list the files in a directory - getting the URL to each file is as simple as getting the URL to the directory they are in (e.g http://www.server.com/images/ ) and adding on the name of the image file.

  3. #3
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, with 'map' I mean a directory...

    But how would this work in PHP? What scripts should I use?

    Jazz

  4. #4
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should use the built in PHP functions for accessing directories. Check this out:

    http://www.php.net/manual/en/ref.dir.php <-- PHP directory functions
    http://www.php.net/manual/en/ref.filesystem.php <-- PHP filesystem functions


Bookmarks

Posting Permissions

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