note 109070 deleted from function.glob by danbrown
| From: | danbrown@php.net | Date: | Mon, 18 Jun 2012 18:50:33 +0000 |
| Subject: | note 109070 deleted from function.glob by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188677@lists.php.net to get a copy of this message | ||
Note Submitter: prinoer at aol dot com
----
Re: Mike McGrew's above; a slash-dot will produce a folder name followed by two dots and a
clickable foldername followed by one dot. Makes for an easily navigable folder structure if included
in every default page.
?>
<pre>Folders Only</pre>
<?php
foreach (glob("*/.*") as $filename)
{
echo "<a
href=\"".$filename."\">".$filename."</a><br/>";
}
?>
<pre>Files Only</pre>
<?php
foreach (glob("*.*") as $filename)
{
echo "<a
href=\"".$filename."\">".$filename."</a><br/>";
}
?>
John