JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Merge branch 'master' of /home/jason/dev/git/wfpl
[wfpl.git] / file_run.php
index fd1d20f..d69b5b6 100644 (file)
 #     }
 
 function file_run($filename) {
-    require_once($filename);
-    ereg_replace('.*/', '', $filename);
-    $func = basename($filename, '.php') . '_main';
-    return $func();
+       require_once($filename);
+       $func = basename($filename, '.php') . '_main';
+
+       if(function_exists($func)) {
+               return $func();
+       }
 }
 
 ?>