By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,403 Members | 1,689 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,403 IT Pros & Developers. It's quick & easy.

Include/Require in Functions

P: n/a
Hi...

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?

Thanks
Joe

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.