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

2009-07-06 Thread Clancy
On Sun, 5 Jul 2009 14:33:07 -0600, govinda.webdnat...@gmail.com (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 > >would include >somefile.php >living in >somedir >regardless from wher

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

2009-07-05 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 would include somefile.php living in somedir regardless from where in the site structure I am calling

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_function

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 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

[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: > I am confusing myself reading the docs just now. > > i.e.: > include_path > basename() > and dirname() > > I had thought from many months ago that > > would include > somefile.php > living in > somedir > regardless from where in the site structure I am calling it. > > Now it d

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 stop

[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 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 would include somefile.php living in somedir regardless from where in the site structure I am calling it. Now it doe

[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 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 would include somefile.php living in somedir regardless from where in the site structure I am calling it. Now it doe