X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=file_run.php;h=295900cbd530c65867279983ba9182f0ae4a991b;hb=bc76ce67d93f43c64e179a043800e500402dccbf;hp=bca5c1846fcac944d61f10d00a3527e078e77cc6;hpb=48805cdb3501fc558a68a31f2aed2f6ad716e297;p=wfpl.git diff --git a/file_run.php b/file_run.php index bca5c18..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. @@ -39,11 +36,10 @@ function file_run($filename) { require_once($filename); $func = basename($filename, '.php') . '_main'; - if(!function_exists($func)) { - $func = basename($filename, '.php'); - } - return $func(); + if(function_exists($func)) { + return $func(); + } } ?>