|
Posted by jj on 04/05/06 19:46
Indeed you are correct, it was a typo on my part.
Thanks for the explanation, I will try out your suggestion.
Best Regards.
"Good Man" <heyho@letsgo.com> wrote in message
news:Xns979C7F1A24E5sonicyouth@216.196.97.131...
>
> > If one file accesses it from a certain directory it works, but then if
> > another file acceses it from yet another directory then it cant find
> > it because the path is different !
> >
> > For example:
> >
> > the follwoing works for one of my files
> >
> > include(/includes/include.php');
> >
> >
> > but for another one i have to use this because its in another part of
> > the directory structure
> >
> > include('events/includes/include.php');
>
> actually, i don't believe you. unless you made a typo in that first
> example, using it in any other file will work.
>
> paths that START with a / mean that they are coming from the TOP of your
> server. You need to find the absolute path to your includes directory;
> from what you wrote in your first example, its right at the top of your
> server.
>
> for the sake of this example, lets say your includes file was found in
> the following directory (starting from the top)
> "/home/username/events/includes".
>
> if you put...
>
> include('/home/username/events/includes/include.php');
>
> ...at the top of your PHP pages, they will all access it without a
> problem.
>
>
Navigation:
[Reply to this message]
|