XAMPP file upload directory problem

Discussion in 'Programming' started by ferdousx, Feb 14, 2009.

  1. #1
    Hello. I am working using XAMPP in my pc. In XAMPP, if you want to upload a file u need to show a absolute path for the upload directory, for example "htdocs/sitename/foldername/". Problem is, everytime i copy the work in WAMP server and also the free host i use, i need to change the path in a relative path to work. So, i was wondering if i can configure the XAMPP somehow(php.ini or somewhere else, for example) so that it can work if i show the upload directory as relative path.
    thanks in advance.
     
    ferdousx, Feb 14, 2009 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    I used relative on both and it worked fine. Heres a snippett to show you what I did:

    I wanted the ability to change the name of the upload folder on a regular basis for security reasons which is why $target is defined in config. You could define it at the top of your script if you like.
     
    Colbyt, Feb 15, 2009 IP