Re: [PHP] Re: best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Sudheer Satyanarayana
Govinda wrote: On Jul 5, 2009, at 2:33 PM, Govinda wrote: I am confusing myself reading the docs just now. i.e.: include_path basename() and dirname() I had thought from many months ago that ?php include '/somedir/somefile.php'; ? would include somefile.php living in somedir regardless from

Re: [PHP] Re: best way to properly build an include path *regardless* from where I am calling the include?

2009-07-05 Thread Michael A. Peters
Govinda wrote: in my include statement, I am now successfully using: /home/metheuser/public_html/ and am not anticipating moving this site.. but still I am thinking there must be a way to make the code bullet proof to dir/ name changes *after* the virtual server root. Or do people just

Re: [PHP] Re: best way to properly build an include path *regardless* from where I am calling the include?

2009-07-05 Thread Govinda
On Jul 5, 2009, at 4:17 PM, Michael A. Peters wrote: I use $includeArray[]=/usr/share/pear; $includeArray[]=/some/other/path; $includeArray[]=/yet/another/path; $incPath = impode(':',$includeArray); ini_set(include_path,$incPath); is that ^ something one can generally set on a

Re: [PHP] Re: best way to properly build an include path *regardless* from where I am calling the include?

2009-07-05 Thread Govinda
On Jul 5, 2009, at 6:15 PM, Shawn McKenzie wrote: AFAIK, include '/somedir/somefile.php'; looks for that specific file in that specific path because you gave an absolute path. Well, that is what I wanted. So I tried this: include '/MY_inc_php/GovBC_php_functions.inc'; but that fails. So I

Re: [PHP] Re: best way to properly build an include path *regardless* from where I am calling the include?

2009-07-05 Thread Shawn McKenzie
Govinda wrote: On Jul 5, 2009, at 6:15 PM, Shawn McKenzie wrote: AFAIK, include '/somedir/somefile.php'; looks for that specific file in that specific path because you gave an absolute path. Well, that is what I wanted. So I tried this: include '/MY_inc_php/GovBC_php_functions.inc';