Last active
August 29, 2015 13:56
-
-
Save arelthia/9335831 to your computer and use it in GitHub Desktop.
Show clickable files in directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$path = "http://mydomain.com/myfiles"; //Set this to where files are located; | |
if ($handle = opendir('.')) { | |
while (false !== ($entry = readdir($handle))) { | |
if ($entry != "." && $entry != "..") { | |
$fullentry = $path.'/'.$entry; | |
echo "<a href='".$fullentry."'>".$entry."</a><br />"; | |
} | |
} | |
closedir($handle); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment