RE: [PHP-DB] donwload listed dir
| From: | Bastien Koert | Date: | Mon, 14 Feb 2005 17:52:51 +0000 |
| Subject: | RE: [PHP-DB] donwload listed dir | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38576@lists.php.net to get a copy of this message | ||
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@mailbox.co.za> To: php-db@lists.php.net Subject: [PHP-DB] 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