Quote:
|
Originally Posted by ViN86
ill probably end up referencing multiple functions from the same file, so ill use require() so i dont end up calling the require_once() multiple times (i agree multiple instances is a poor technique ghost)
|
I think in your case, either require_once() or require() will work because you'd still only be calling one instance. Since all the functions you need will be located on a single php script. Maybe you think require_once() means you need to require the file again if you need the function again on the same page. Which isn't the case.
Require_once() simply checks to see if you've already included an instance. If you have, it will not include it again. If you haven't, it will include it. Require() does not check and will include an instance again no matter if you've already included it or not.
I only suggested require_once() because if the plan to extend into OOP programming later on, require() may cause errors if your classes reference other classes.