RE: [PHP] include() and paths

From: Date: Tue, 05 Mar 2002 16:32:20 +0000
Subject: RE: [PHP] include() and paths
Groups: php.general 
Request: Send a blank email to php-general+get-87288@lists.php.net to get a copy of this message
> -----Original Message----- > From: Nick Wilson [mailto:nick@explodingnet.com] > Sent: 01 March 2002 17:30 > To: PHP-General > Subject: Re: [PHP] include() and paths > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > * and then Nick Winfield declared.... > > I didn't catch the first part of this thread (rampant > deletion ahoy) so > > please excuse if I am talking nadgers. The way I see it, if you are > > calling includes/requires from within other includes, the > path is that of > > the script that makes the first include. If that makes any sense. > > Sure does, just wondered if anyone could see a way round my > little wish > :-) AFAIK there is no easy way to do this and as neither the > manual nor > this list has been able to tell me different I'll have to find another > solution. Thanks for the help though! H'mm, the only even *vaguely* useful thing I can think of here is that dirname(__FILE__) should give you the full directory path of the *current* include file. Fine for "here-relative" names, but you'd need to manipulate it further to do the equivalent of ..-type relativities. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#87288) next »