[Q] Question about is_dir() function.
| From: | ��ö�� | Date: | Wed, 09 Feb 2000 16:04:24 +0000 |
| Subject: | [Q] Question about is_dir() function. | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9981@lists.php.net to get a copy of this message | ||
* Redhat 6.0, PHP4 CVS 02/05/2000 *
/home/php/public_html/book <========= directory
/home/php/public_html/ftp <========= directory
/home/php/public_html/session <========= directory
/home/php/public_html/gd <========= directory
/home/php/public_html/dir <========= directory
/home/php/public_html/dir/mydir.php <========= php file
/home/php/public_html/mydir.php <========== same with /dir/mydir.php
--------------- mydir.php -------------
<?
$dir = "/home/php/public_html/";
$d = dir($dir);
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while($entry=$d->read()) {
if ( is_dir($entry) ) {
echo "<BR>[DIR]".$entry."";
}
else {
echo "<BR>[FILE]".$entry."";
}
}
$d->close();
?>
-----------------------------------------
http://localhost/~php/mydir.php
------------------------------------
Handle: Resource id #1
Path: /home/php/public_html/
[DIR].
[DIR]..
[DIR]book
[DIR]ftp
[DIR]session
[DIR]dir
[FILE]mydir.php
[DIR]gd
-----------------------------------
WORKS GOOD!
http://localhost/~php/dir/mydir.php
------------------------------------
Handle: Resource id #1
Path: /home/php/public_html/
[DIR].
[DIR]..
[FILE]book <---------- ?? directory
[FILE]ftp <---------- ?? directory
[FILE]session <---------- ?? directory
[FILE]dir <---------- ?? directory
[FILE]mydir.php
[FILE]gd <---------- ?? directory
------------------------------------
is_dir() BUG?
==================================================
No. 1 우리 인터넷, 다음
평생 쓰는 무료 E-mail 주소 한메일넷
지구촌 한글 검색서비스 Daum FIREBALL
http://www.daum.net