note 53495 added to function.is-dir
| From: | akashif at freezone dot co dot uk | Date: | Fri, 03 Jun 2005 11:50:09 +0000 |
| Subject: | note 53495 added to function.is-dir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89852@lists.php.net to get a copy of this message | ||
just a simple script to for those who dont have the IIS or Apache Dirlisting available , this will
make onr for you
<?php
$DirPath=$_GET['DirPath'];
if($DirPath=="")
{
$DirPath='./';
}
if (($handle=opendir($DirPath)))
{
while ($node = readdir($handle))
{
$nodebase = basename($node);
if ($nodebase!="." && $nodebase!="..")
{
if(is_dir($DirPath.$node))
{
$nPath=$DirPath.$node."/";
echo "-> -> -> <a
href='dir.php?DirPath=$nPath'>$node</a><br>";
}
else
{
echo "<a href='$node'>$node</a><br>";
}
}
}
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.is-dir.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53495
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53495&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53495&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53495&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53495&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53495&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53495&report=yes
Search -- http://master.php.net/manage/user-notes.php