I have a code that shows dots in the directory. I'm trying to get rid of them but google doesn't help, those dots mean back and localhost and the dots need to be removed how do i do this?
<?php
$map = opendir('file');
while ($bestand = readdir($map))
{
echo "<a href='file/$bestand'>$bestand</a><br/>";
}
closedir($map);
?>
add
if ($bestand == '.' || $bestand == '..')
continue;
before the line contains echo
This code will skip iteration whenever $bestand is the dots.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加