Include/Require in Functions

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I'm using ADOdb for an application and writing a series of functions
that are split across many .php files to be included as needed.

If a single .php file has the following:

function x

function y

function z

I believe that if I want to use the ADOdb library, I would need to
include/require (once?) in EACH function individually.

1. Is the above statement correct?
2. If so, is include/require_once the preferred method?
3. Is there a way that I can globally refer to ADOdb without having an
include in each function?


Re: Include/Require in Functions

I'm confused as to what ADODB library you are including.

I would say to try it by only including the file once at the top, it
would make sense that that action would bring the library into the
current execution context and make it available to whatever else is
executing.  If that doesn't work, try it the other way.

Site Timeline