3
Contributors
5
Replies
9
Views
5 Years
Discussion Span
Last Post by sDJh
1

If you are using Apache web server then use an .htaccess file, with this directive:

order allow,deny
deny from all

put this inside upload directory.

Edited by cereal

0

If you deny direct access then you need a script to display file names and to provide a download option. For example:

<?php
$files = glob('./upload/*.*');
print_r($files); # print array
?>
0

or

@readfile("./path/to/your/file");

to output the content of these files. Take care that you might want to manipulate the headers for the correct content, name and size.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.