The errors take the following form:
Warning: main(../includes/functions/calculate.php): failed to open stream: Too many open files in /home/kicklond/includes/tasks/top.php on line 25
Line 25 is the include line of the following code:
$folders=array(
$tmp["ab"]."includes/functions/",
$tmp["ab"]."includes/config/",
$tmp["ab"]."includes/classes/",
$tmp["ab"]."includes/classes/modules/",
$tmp["ab"]."includes/classes/modules/subclasses/"
);
//include them
for ($i=0;$i<count($folders);$i++){
if ($handle = opendir($folders[$i])) {
while (false !== ($file = readdir($handle))) {
if (($file == ".") || ($file == "..")){
continue;
}
$fileext=explode(".",$file);
include_once $folders[$i].$file;
}
}
closedir($handle);
}
}
I know that the explode is a little dodgy- it won't like files which are foo.bar.php, but it works for me!
Cheers,
Dom