if ($handle = opendir('news/')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$filesx[]=$file;
}
}
closedir($handle);
}
$x=0;
$files=array_reverse ($filesx);
while ($files[$x] != NULL){
$file = trim($files[$x]);
$fd = fopen ($file, "r");
while (!feof ($fd)) {
$buffer = fread($fd, 1024);
};
fclose ($fd);
};
When I try running the script at home on windows xp, running Apache/1.3.27 (Win32) PHP/4.2.3 (as module) everything is ok, but when I upload on Red Hat Apache 1.3.27 the script goes to endless loop! Why?
Thanx for help!