Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make format_decimal always omit the ".0" suffix
[wfpl.git]
/
file_run.php
diff --git
a/file_run.php
b/file_run.php
index
409b81d
..
e501668
100644
(file)
--- a/
file_run.php
+++ b/
file_run.php
@@
-1,4
+1,4
@@
-<?
+<?php
# Copyright (C) 2005 Jason Woofenden
#
# Copyright (C) 2005 Jason Woofenden
#
@@
-33,12
+33,13
@@
# return array('me', 'secret');
# }
# return array('me', 'secret');
# }
-function file_run($filename) {
+function file_run($filename /* args... */) {
+ $args = array_slice(func_get_args(), 1);
require_once($filename);
$func = basename($filename, '.php') . '_main';
if(function_exists($func)) {
require_once($filename);
$func = basename($filename, '.php') . '_main';
if(function_exists($func)) {
- return $func();
+ return call_user_func_array($func, $args);
}
}
}
}