Referring to Parent Folders

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


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-10-2004
Vinny
 
Posts: n/a
Default Referring to Parent Folders

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



Reply With Quote
  #2 (permalink)  
Old 02-10-2004
 
Posts: n/a
Default Re: Referring to Parent Folders


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







Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:35 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0