function include_wholePath($path,$method='include_once'){ $handle=opendir($path); while($dname = readdir($handle)){ if(!is_dir($dname) AND substr($dname,strlen($dname)-4)=='.php'){ $method($dname); } } } /* why do i get: Fatal error: Call to undefined function include_once() in F:\xampplite\htdocs\tools\tools\tools.php on line 32 */