ID: 14062
Updated by: derick
Reported By: [EMAIL PROTECTED]
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] [EMAIL PROTECTED]

I cannot reproduce this under Linux. File types are 
returned correctly.

Could someone with Win32 test this?


------------------------------------------------------------------------

[2001-11-14 17:09:11] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to