Jump to content

Archived

This topic is now archived and is closed to further replies.

Poi

File viewing.

Recommended Posts

How might i make ti so with this file viewing code, it does not show the first 2 files listed?(It shows 2 files that arent there.)

<?
$dir = "uploads/";

if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "Filename- " . $file . "<br><form method='post' action='delete.php'>
<input type='hidden' name='file' value='$file'><input type='submit' value='Delete'> <br>\n";
}
closedir($dh);
}
}

Share this post


Link to post
Share on other sites
[a href=\"http://us3.php.net/manual/nl/function.readdir.php\" target=\"_blank\"]Manual.[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.