Forum Moderators: phranque

Message Too Old, No Replies

php value include path - syntax question

Optimizing htaccess include path directive...

         

Nick_oTeane

8:04 am on May 13, 2009 (gmt 0)

10+ Year Member



Since this is my first post.. Hello all! Thanks for all the useful help I found here in the past month!

I had severe problems to set up my PHP include path when it came to include from subdirectories. Got this solved so far by using the following line in my htaccess:

php_value include_path ".:/usr/local/lib/php:my_includes:../my_includes:../../my_includes:../../../my_includes:../../../../my_includes"

Like mentioned it works perfect but Iīm trying to find a way to avoid the ugly "../" constructs. Is there any way to use something like (document_root) instead and cut down on repetitions just to make it work from subdirectories?

Help on this is truely appreciated.. Nick

edit: Forgot to mention that this is on a shared server running Apache2x...

[edited by: Nick_oTeane at 8:08 am (utc) on May 13, 2009]

Nick_oTeane

8:01 am on May 15, 2009 (gmt 0)

10+ Year Member



Did I ask something really stupid?

jdMorgan

3:19 pm on May 15, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oops... Seems like no-one here knows the answer. Have you tried asking in the PHP forum?

Jim

Nick_oTeane

4:07 am on May 17, 2009 (gmt 0)

10+ Year Member



Hi Jim..

Sorry for not getting back on this - I was offline due to not having any electricity in our street for more than a day..

Couldnīt find any hint on this anywhere. But donīt worry, like said, it`s working perfect right now and I think itīs fine if I just leave it like it is. Thanks anyways

Nick