Jump to content


Photo

File viewing.


  • Please log in to reply
2 replies to this topic

#1 Poi

Poi
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 13 May 2006 - 05:21 AM

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);
}
}

#2 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 13 May 2006 - 06:25 AM

what do you mean tha single and double dot?

#3 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 13 May 2006 - 07:22 AM

[a href=\"http://us3.php.net/manual/nl/function.readdir.php\" target=\"_blank\"]Manual.[/a]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users