[PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
as they aren't inside the webserver's "scope", I just can't simply link to them. Is there any way I can implement this? To download a file located at X directory, anywhere in the system? And taking security into consideration, of course. Thanks in advance, Daniel Silva --

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
sposition: attachment; > filename='.basename($file['filename'])); > } > header('Content-Length: '.filesize($file['filename'])); > readfile($file['filename']); > } else { > echo 'no such file'; > } > ?> > >

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
w the mime type and might be > forced to use application/octet-stream. > You can do > if(dirname(realpath($user_files_dir . $_GET['filename'])) == > $user_files_dir) > as a security check > > Daniel Silva wrote: > > >That is a very nice solution, the problem is,

Re: [PHP] max_execution_time and set_time_limit() problem.

2003-03-04 Thread Daniel Silva
of nothing else right now. I know it's not much, but let us know... Cheers, Daniel Silva "Eric Wood" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Even set_time_limit(0) does extend the timeout. Always a 30 second timeout. > Any other ideas? > >

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
put buffer and maybe it's showing them. What troubles me is the fact that it doesn't have a certain behaviour, instead, like I said, sometimes works, and sometimes it doesn't. Daniel "Daniel Silva" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > T

Re: [PHP] Downloading files outside the webserver

2003-03-05 Thread Daniel Silva
The problem was solved. I added a call to the exit() construct at the end of the function and haven't had any more problems since. I would like to thank everyone who helped me. Cheers, Daniel "Daniel Silva" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >

Re: [PHP] This weird behavior is killing

2004-06-17 Thread Daniel Silva
Php.Net wrote: The way PHP handles includes is very weird, for example: - create a folder, name it f ex "includes" - create 2 sub-folders, call them level1 and level2 - now lets create a file, "includes.php" includes.php -- --