ermMMmm..
it seems ... that here is still some problem.
i try to debug it for long time
ok let see this simple script, which list files only, not do the searching.
System: Windows2000
Document root: c:\program files\apache group\apache\htdocs
i made a simple script based on the script you gave me.
<?php
function opend($dir)
{
if ($dir = opendir($dir)) {
while ($file = readdir($dir) ) {
if(is_dir($file))
echo "it is a dir ";
echo "$file<br>";
}//end while
closedir($dir);
}//end if
} // end func
opend("./chat");
?>
let's say. in my document root. i have folder named "chat"
and under that "chat" directory there is a folder named"image".
script will open the chat folder and if meets any folder it prints out "it is a dir" and list all files ... conceptually.
but it does not work in this way. even when it meets the "image"(sub-dir of chat), it does not print the "it is a dir ".
then i copy above script to the "chat" folder. change the the last line to be opend("./");, then it prints out "it is a dir image".
it seems the script can't work for 2nd level of sub-directory. only work in direct 1st level sub-directory..... is it a WINDOWS platform problem...
so strange.... it bothers me a lot.
can u help me again... or anyone else has any experince or... idea of it....
really appreciate if anyone can help me on this problem
and i do need to thank HalfaBee a lot.