This is a discussion on Referring to Parent Folders within the PHP General forums, part of the PHP Programming Forums category; I don't know if this is a PHP config problem, or an Apache 1.3/PHP 4 problem, or ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I don't know if this is a PHP config problem, or an Apache 1.3/PHP 4
problem, or what. When I include a script, say 2 folders up in the structure, I'm having to move up to it instead of skipping to root and moving down to it. Allow me to clarify, let's say my tree structure looks like so [brackets indicate folder]: [doc root] -----[php] ---------- script.php ---------- [some folder] --------------- [another folder] -------------------- current.php Let's then say that I want to include 'script.php' inside 'current.php'. As it is now, I'm having to use include('../../script.php'). This is obviously a nuisance, especially if I want to move things around. Now, I remember in the past (different server config), using include('/php/script.php') would work perfectly fine, but it does NOT work now, and I'd love for it to work. Using /folder/file.ext works in regular HTML so I can only assume it is not a problem with Apache. So my question is, is this simply a PHP config problem? PHP 4.3.4 Apache 1.3.something Thanks!!!!! Vinny |
|
|||
|
"Vinny" <hctimo787@yahoo.com> wrote in message news:wO_Vb.20321$GO6.3840@newsread3.news.atl.earth link.net... > I don't know if this is a PHP config problem, or an Apache 1.3/PHP 4 > problem, or what. When I include a script, say 2 folders up in the > structure, I'm having to move up to it instead of skipping to root and > moving down to it. Allow me to clarify, let's say my tree structure looks > like so [brackets indicate folder]: > > [doc root] > -----[php] > ---------- script.php > ---------- [some folder] > --------------- [another folder] > -------------------- current.php > > Let's then say that I want to include 'script.php' inside 'current.php'. As > it is now, I'm having to use include('../../script.php'). This is obviously > a nuisance, especially if I want to move things around. Now, I remember in > the past (different server config), using include('/php/script.php') would > work perfectly fine, but it does NOT work now, and I'd love for it to work. > Using /folder/file.ext works in regular HTML so I can only assume it is not > a problem with Apache. So my question is, is this simply a PHP config > problem? > > PHP 4.3.4 > Apache 1.3.something > > Thanks!!!!! > > Vinny > > > Edit your php.ini file and include any of the folders that you want to "include" from. include_path = ..:/usr/local/apache2/:/usr/local/apache2/php::/usr/local/apache2/php/some folder................ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|