I used following code in my php:
<?php
$h= opendir("/home");
while($file= readdir($h)){
echo $file;
}
closedir($h);
?>
It can list /home folder successfully for first time, but if I refresh the IE (by press F5), It can't open the dir anymore, and show following problem:
Warning: 1 is not a valid Directory resource in /home/html/eng3/tesp.php on line 3
Warning: 1 is not a valid Directory resource in /home/html/eng3/tesp.php on line 6
Could anybody tell me what's the problem?
Thx!