RE: donwload listed dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



list them out and provide the link for each...code for the lisitng is straight from the manual

<?php
$dir = "/etc/php5/";

// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
//change the echo here to make it a link
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
}
closedir($dh);
}
}
?>



bastien
From: "it clown" <php5@xxxxxxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Subject:  donwload listed dir
Date: Mon, 14 Feb 2005 10:21:18 +0200

Hi All,

How would i create links dynamicaly for each file that has
been listed in a dir?

Regards
______________________________________________________________
http://www.webmail.co.za the South African FREE email service

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux