I asked before how to get the content of a directory and I got suggested dirscan() which was exactly what I needed.
Now I want it so that the files are links redirected to the corresponding file. So if there was a file named 'book.pdf', you could click it and it would open 'book.pdf'.
Right now I did this:
<?php
$dir = '/books';
$files = scandir($dir);
foreach($files as $file) {
echo "$file<br/>";
}
?>
Teşekkür ederiz!