|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-29 14:36 UTC] sniper@php.net
[2002-09-30 04:21 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
This script works OK: if ($handle = @opendir('.')) { while (false !== ($file = readdir($handle))) { if (is_dir($file)) { echo "Is directory $file <BR>"; } else Print "Is file $file <BR>"; } closedir($handle); } When I replace "." with i.e. "C:\webpages\test" (this is the directory where I run the script from) it also works fine. But when I try the read a directory which is not in the same directory as the script i.e. "C:\webpages" than it displays that there are only files. So reading a directory lower or higher that the direcory where you are running a script from gives a wrong output.