Skip to content

Instantly share code, notes, and snippets.

@felladrin
Created February 11, 2012 15:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save felladrin/1800645 to your computer and use it in GitHub Desktop.
Save felladrin/1800645 to your computer and use it in GitHub Desktop.
Código PHP para listar subpastas com links
<?php
if ($diretorio = opendir("./"))
{
while(false !== ($pasta = readdir($diretorio)))
{
if(is_dir($pasta) and ($pasta != ".") and ($pasta != ".."))
{
echo "<a href='$pasta'>$pasta</a><br>";
}
}
closedir($diretorio);
}
?>
@josenildotiago
Copy link

Perfeito

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment