SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    /'s screwing up in file upload

    One of the features I have in a script is a file upload.
    A problem occures when a / is in a file name because it reads it as a next directory ie c:/windows/

    so lets say I had the image called

    re/max.gif

    its tries to upload hte picture "max.gif" into a folder "re"

    I need to keep the slashes in there.. possible?

  2. #2
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why do the slashes need to be there, out of curiousity? I'd use an underscore (_) instead, personally. I'm sorry if that's not helpful, I'm just curious really.

  3. #3
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, its mainly because of a design mistake when the program was initialy created a few montsh back.

    the database has categories, one of which is Re/max (a realtor)
    They have to have the / in their name for legal reassons.
    When uploading the picture, it is an add for that directory.

    When the page is loaded it looks for a picture with the same name as the category.
    so its looking for a file named re/max.whatever

    thats why the slash had to be in there.

    I solved the problem now, I just rewrote the code that was looking for the image to use the index collums instead on names


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
  •