Ok thanks. I found a way to upload the files to a directory and also how to read into the directory and display the
files from the directory using this function:
<?php
if ($handle = opendir('.../uploads')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "$file\n";
}
}
closedir($handle);
}
?>
Also, I can download a particular file from directory using this function
<?php
$file = '...upload/Thumb.png';
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>
I would like to know how I can display the items from the directory, in a list. And each item
has a link that, if pressed can be downloaded. THANKS ALOT FOR YOUR HELP!