|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-11-14 17:04 UTC] corwin1974 at yahoo dot 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 13:00:01 2025 UTC |
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.