X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=file_run.php;h=295900cbd530c65867279983ba9182f0ae4a991b;hb=b74d74687c568aeb9a21b786193a69b534a20f88;hp=fd1d20fe58ffe4470e902e548dcc6e91a1d420fc;hpb=6c27f346217f7b4b8b24064371f2461cf57c6167;p=wfpl.git diff --git a/file_run.php b/file_run.php index fd1d20f..295900c 100644 --- a/file_run.php +++ b/file_run.php @@ -1,22 +1,19 @@ -. # This function makes it easier to put everything in functions like you should. @@ -37,10 +34,12 @@ # } 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(); + } } ?>