Bug #14062 Updated: Wrong filetype displayed
| From: | derick@php.net | Date: | Thu, 15 Nov 2001 07:15:10 +0000 |
| Subject: | Bug #14062 Updated: Wrong filetype displayed | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70513@lists.php.net to get a copy of this message | ||
ID: 14062
Updated by: derick
Reported By: corwin1974@yahoo.fr
Old Status: Open
Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: win98SE
PHP Version: 4.0.6
New Comment:
Then it's not a bug. Filetype works from the current directory, not from the directory you used
with opendir().
Derick
Previous Comments:
------------------------------------------------------------------------
[2001-11-14 20:47:28] zak@php.net
I cannot reproduce this under Linux. File types are
returned correctly.
Could someone with Win32 test this?
------------------------------------------------------------------------
[2001-11-14 17:09:11] corwin1974@yahoo.fr
Sorry, the script is :
<?
$d = "/fichiers"; // dir to show
$h = opendir($d);
while($e = readdir($h))
{
echo filetype("$e");
echo "<br>\n";
}
closedir($h);
?>
The previous script is a workaround to get the right filetype.
------------------------------------------------------------------------
[2001-11-14 17:04:44] corwin1974@yahoo.fr
When running this script :
<?
$d = "/fichiers"; // dir to show
$h = opendir($d);
while($e = readdir($h))
{
echo filetype("$d/$e");
echo "<br>\n";
}
closedir($h);
?>
the wrong filetype is displayed (files and directories are displayed as directories), except when
the script is run in the current (.) directory
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14062&edit=1