[thelist] PHP includes (how to call from subdir)

j.d. welch so.there at showtunepink.com
Sat Dec 7 09:17:01 CST 2002


sure, you can do it like that, but i think it's worth mentioning that
you can change the include_path directive per directory. in an
.htaccess file in your DocumentRoot, add something like:

php_value include_path=".:/path/to/my/includes:/some/other/path"

(the . indicating current directory) and you can forgo the relative
link nonsense.

On Friday, December 6, 2002, at 05:45  PM, Aleem Bawany wrote:

> Sorry, but I was doing something wrong. You can ignore that last post
>
> PHP _does_ allow includes from parent dirs. I found the solution (not
> the most elegant) is to determine how deep you currently are and then
> do
> call the include file by having the appropriate number of ascending
> thingomajigs (e.g. ../../../ for root/a/b/c/).
>
> aleem
>
>
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !




More information about the thelist mailing list