Re: Sitewide Header & Footer Includes || Trouble with Relative Paths..........

From: Date: Sat, 22 Feb 2003 23:13:16 +0000
Subject: Re: Sitewide Header & Footer Includes || Trouble with Relative Paths..........
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-136659@lists.php.net to get a copy of this message
Hey Tom. Thanks for the idea; however, since we're not hosting the site on our own server, we don't have permissions for altering the php.ini file.......... --Noah "Tom Rogers" <trogers@kwikin.com> wrote in message news:591280681.20030223050519@kwikin.com... > Hi, > > Sunday, February 23, 2003, 6:14:32 AM, you wrote: > CH> Hey All. > > CH> Got a perhaps easy question here: > > CH> How can I create a global header and footer include to my site pages where I > CH> don't rely on absolute paths to include and image files? > > CH> I'm having trouble including my header and footer .inc's within a > CH> multi-level directory structure -- the relative paths to images (and to > CH> includes within includes) are not currently accessed within the current > CH> directory structure. > > CH> I'm assuming I'll need to prepend all image and include files with a path > CH> variable that I set within each page, or something along those lines? > > CH> Any help much appreciated, > > CH> --Confused > > CH> -- > > I do this at the top of my scripts > > ini_set > ("include_path",'path/to/inc/dir:'.ini_get("include_path")); > > that way you just do include('file.inc') from anywhere and it will find your > files. > > -- > regards, > Tom >

« previous php.general (#136659) next »