wrong directory

This is a discussion on wrong directory within the PHP Language forums, part of the PHP Programming Forums category; Hello, I have a calendar on my site in an extra directory <calendar> in root i have a ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-27-2003
Chris
 
Posts: n/a
Default wrong directory

Hello,

I have a calendar on my site in an extra directory <calendar> in root i have
a site where i include the calendar with:<?php include("calendar"); ?> which
works fine so far but the calendar contains links to files in the calendar
directory but now it tries to find this files in the root directory why? Is
there a easy way to fix that?
If I move all the files to the root directory it works fine but it becomes
chaotic.
I appreciate any help.

Thanks
chris



Reply With Quote
  #2 (permalink)  
Old 10-27-2003
Pedro
 
Posts: n/a
Default Re: wrong directory

Chris wrote:
> Hello,
>
> I have a calendar on my site in an extra directory <calendar> in root i have
> a site where i include the calendar with:<?php include("calendar"); ?> which
> works fine so far but the calendar contains links to files in the calendar
> directory but now it tries to find this files in the root directory why? Is
> there a easy way to fix that?
> If I move all the files to the root directory it works fine but it becomes
> chaotic.


Try adding the calendar directory to the include path:

<?php // calendar
$calendar_dir = '/home/chris/public_html/calendar/';
set_include_path(get_include_path() . ':' . $calendar_dir);
?>

If you're using windows, I guess the path separator should be ";"

--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Reply With Quote
  #3 (permalink)  
Old 10-28-2003
Steve
 
Posts: n/a
Default Re: wrong directory

Could also modify the include directives to point to the literal path...
include_once("/home/mysite/public_html/calender/myfile.php");
Rather than just
include_once("myfile.php");


Pedro <hexkid@hotpop.com> wrote in message news:<bnk275$11scd7$2@ID-203069.news.uni-berlin.de>...
> Chris wrote:
> > Hello,
> >
> > I have a calendar on my site in an extra directory <calendar> in root i have
> > a site where i include the calendar with:<?php include("calendar"); ?> which
> > works fine so far but the calendar contains links to files in the calendar
> > directory but now it tries to find this files in the root directory why? Is
> > there a easy way to fix that?
> > If I move all the files to the root directory it works fine but it becomes
> > chaotic.

>
> Try adding the calendar directory to the include path:
>
> <?php // calendar
> $calendar_dir = '/home/chris/public_html/calendar/';
> set_include_path(get_include_path() . ':' . $calendar_dir);
> ?>
>
> If you're using windows, I guess the path separator should be ";"

Reply With Quote
  #4 (permalink)  
Old 10-28-2003
Chris
 
Posts: n/a
Default Re: wrong directory

No thats not it.
It still tries to find the images and links from the calendar directory in
the root directory.
Thanks for the thought


"Steve" <gr82meetu78@yahoo.com> wrote in message
news:bb8f15bd.0310271947.29aee39b@posting.google.c om...
> Could also modify the include directives to point to the literal path...
> include_once("/home/mysite/public_html/calender/myfile.php");
> Rather than just
> include_once("myfile.php");
>
>
> Pedro <hexkid@hotpop.com> wrote in message

news:<bnk275$11scd7$2@ID-203069.news.uni-berlin.de>...
> > Chris wrote:
> > > Hello,
> > >
> > > I have a calendar on my site in an extra directory <calendar> in root

i have
> > > a site where i include the calendar with:<?php include("calendar"); ?>

which
> > > works fine so far but the calendar contains links to files in the

calendar
> > > directory but now it tries to find this files in the root directory

why? Is
> > > there a easy way to fix that?
> > > If I move all the files to the root directory it works fine but it

becomes
> > > chaotic.

> >
> > Try adding the calendar directory to the include path:
> >
> > <?php // calendar
> > $calendar_dir = '/home/chris/public_html/calendar/';
> > set_include_path(get_include_path() . ':' . $calendar_dir);
> > ?>
> >
> > If you're using windows, I guess the path separator should be ";"



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB 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 06:32 AM.


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