X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=file_run.php;h=d69b5b6a0c2264e5abcc180e40752ed582524216;hb=b0b28a4587992b92f47abb0429df0e1eaf7f151f;hp=bca5c1846fcac944d61f10d00a3527e078e77cc6;hpb=48805cdb3501fc558a68a31f2aed2f6ad716e297;p=wfpl.git diff --git a/file_run.php b/file_run.php index bca5c18..d69b5b6 100644 --- a/file_run.php +++ b/file_run.php @@ -39,11 +39,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(); + } } ?>