Ben belirli bir dizinin içeriğini görüntüler ve kullanıcıların her dosya indirmenize izin veriyor bu php komut dosyası oluşturduk. İşte kod:
<?php
if ($handle = opendir('test')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<a href='test/$file'>$file\n</a><br/>";
}
}
closedir($handle);
}
?>
Bu komut ayrıca klasörleri görüntüler, ama ben bir klasörü tıkladığınızda, o klasörün içeriğini görüntülemek, ama varsayılan Apache görünümü AUTOINDEX.
What I would like the script to do when a folder is clicked, is display the contents, but in the same fashion as the original script does (as this is more editable with css and the like).
Would you know how to achieve this?