Page 1 of 1

File Upload: PRoblem with upload directory

Posted: Sat Jun 26, 2004 2:23 am
by trainspotter
hi folks,

i have a more-or-less newbie problem:

i have a upload directory given by my provider which is outside the home-range:

/www/home/index.php = http://www.websitename.com/index.php
/www/uploads

I can put files via a form to to uploads-directory but I can't adress them with html because they are out side the website. I also can't move them with copy or move_upload_file to another directory because I don't have the permissions.

how can i adress the files?

thanks for feedback

marcell

Posted: Sat Jun 26, 2004 2:39 am
by feyd
hmmm using a script redirector of sorts..

create a script that takes the filename as an argument.

here's some pseudo code:

Code: Select all

if filename exists
{
  figure out mime-type
  send appropriate headers
  readfile() the filename
}
otherwise
{
  say "no file"
}