Page 1 of 1

root problem

Posted: Sat Feb 24, 2007 12:39 pm
by user___
Hi guys,
I have the following problem:
I have a forum which was set up in the web_root dir(Accessible by everyone).
But I decided to move my framework in an outer directory(One step up from my web_root).
I set in my config file $_SERVER['DOCUMENT_ROOT'] var which contains the root path but I need it one step above the web root and I do not know how do this. I can not use any replace functions due to the fact that my application must be portable. I mean that I want to include classes from the same config but the only problem is that when I call ini_set with the above variable($_SERVER['DOCUMENT_ROOT']) I do not go where I want to.

Posted: Sat Feb 24, 2007 12:50 pm
by neophyte
How about explode() the string on '/' and pop the top off with array_shift and rebuild?

Reply

Posted: Sat Feb 24, 2007 1:30 pm
by user___
As I said a time ago in the same forum "Sometimes, the simplest things are far away from my mind.".
Thank you.