New To Php so please bear with me... :)

I used the readdir function to read the files listed on a Apache server. And
it worked fine. Now I would like to be able to get the files the php code
returns, to be links. Where the user can click the file and download it. Also
for the files to sit within a table or at least look neat on the page. is the result I get from the php code
below. Help!

if ($handle = opendir('/my/directory')) {
    echo "Directory handle: $handle\n";
    echo "Files:\n";

    while (false !== ($file = readdir($handle))) { 
        echo "$file\n";


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to