Re: Preliminary patch for allowing relative includes

From: Date: Wed, 11 Jul 2001 19:14:21 +0000
Subject: Re: Preliminary patch for allowing relative includes
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-59745@lists.php.net to get a copy of this message
I don't have access to the PHP CVS at the moment (note to self: get a C compiler)... but I wanted to ask how this will affect (or will it?) HTML generated from within included PHP files. Eg. A is at web root and includes B in a subdirectory X. B generates HTML that calls for image C.gif in subdirectory X. Will src = "C.gif" work or will it still be src = "X/C.gif" or is this not affected at all? If it's not affected, is it possible to have an environment variable that contains the path to the subdirectory of the latest included file so that it can be accessed from within that file to refer to itself? I believe that this will be very useful for templating applications. Currently I've developed a templating solution that relies on regex to change all relative links (inc. those to images, embeded objects, etc. etc.) in included files to absolute ones but this is a rather convulted way of doing things. (I hope any of this makes sense!) Aral :) ______________________________ (aral@kismia.com) New Media Producer, Kismia, Inc. (aral@american.edu) Adj. Prof., American University ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

« previous php.dev (#59745) next »