[thelist] PHP User Defined Functions
Kristy Frey
kristenannfrey at yahoo.com
Wed Jan 2 09:40:07 CST 2002
Does anyone know of a way to call a User Defined PHP function that is in file separate from the
current script WITHOUT doing an include on the file that contains the function.
Here is my dilemma. I am borderline obsessive when it comes to organizing my code. I have
written many php functions that I call from "all over" in my code. When I write a function, say
"MyPhpFunction", I create a file called MyPhpFunction.php that contains ONLY the code for the
function "MyPhpFunction" and I store the file in a directory with all my other functions. The
file naming convention prevents me from creating more than one function with the same name.
Therefore my code looks like:
include_once($library_root."functions/MyPhpFunction.php");
$result_of_my_function=MyPhpFunction(&$some_parameter);
Is there a way to call the function w/o the include?
I really appreciate the responses that everyone posts. I wish I could contribute more, but I only
have about 2 months of self taught experience to share.
Thanks a lot!
Kristy
<tip type="miva">
the MIVA web scripting language lets you call user defined functions in other files
allowing you to create a very organized system for your user defined functions:
<MvDO FILE="/functions/MyMivaFunction.mv" NAME="result" VALUE="{MyMivaFunction()}">
</tip>
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
More information about the thelist
mailing list