Page 1 of 1

include path problem

Posted: Fri Oct 17, 2008 12:47 am
by kishanprasad
i have a module module1 in my app app1


instead of giving the following syntax in all my module1 files like this
include(dirname(__FILE__)."/header.php")

can i have some thing like set_includepath(dirname(__FILE__)) in my module index page please help me

Re: include path problem

Posted: Fri Oct 17, 2008 1:08 am
by SBro
Look into the ini_set() function, specifically:

Code: Select all

 
ini_set('include_path', ini_get('include_path').':/path/to/includes:');
 
What the above is doing is adding your own includes path to the existing include path specified.

Re: include path problem

Posted: Fri Oct 17, 2008 1:14 am
by kishanprasad
yes ima using

ini_set("include_path",get_include_path().PATH_SEPARATOR.dirname(__FILE__));

but still its not taking the relative