Page 1 of 1

Upload Directory problems

Posted: Tue Jun 24, 2003 7:59 pm
by DuFF
Hey,
I have just created an uploader that uploads a file and adds a row in a MySQL table. The problem I'm having is with where the file uploads to. ($category is determined by a form).

Right now my script is in the folder:
uploader/

So the upload path turns out to be:
uploader/$category/filename.ext

I want the files to upload to:
$category/filename.ext

I would like to keep the script in the "uploader" folder so that I can add .htaccess to it. How can I have the files uploaded to a different subdirectory?
Any help would be greatly appreciated.

Posted: Tue Jun 24, 2003 9:25 pm
by DuFF
Nevermind, I figured it out.

$_SERVER['DOCUMENT_ROOT']