RE: [PHP] Require() using relative path

From: Date: Thu, 27 Jul 2000 08:35:37 +0000
Subject: RE: [PHP] Require() using relative path
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-8495@lists.php.net to get a copy of this message
how about using include "$DOCUMENT_ROOT/inlcude/your_include_file"; M@ > -----Original Message----- > From: Ryan Adams [mailto:radams@fcs.uga.edu] > Sent: Wednesday, July 26, 2000 08:10 > To: Rasmus Lerdorf > Cc: php-general@lists.php.net > Subject: Re: [PHP] Require() using relative path > > > Ah yes. That will work. > > The question is still alive in my mind, however, from a > portability standpoint. > For instance, I would like to be able to easily port the code to > any server > that is running php4 and not require server changes. Part of this includes > explicity setting variables like magic_quotes and whatnot in a > header file. > > Is it also possible to set include_path in that manner? > > Thanks, > Ryan > > > On Tue, Jul 25, 2000 at 08:28:31AM -0700, Rasmus Lerdorf wrote: > > Just add the templates directory to your include_path and you > can do that. > > > > -Rasmus > > > > On Tue, 25 Jul 2000, Ryan Adams wrote: > > > > > Man, I'd like to see something like this too. I'm working on > a reporting > > > system that includes files with includes in them, across > several directories. > > > It would be really nice to have a function that did it > automatically... > > > > > > Would that go against the current architecture? How are > includes/requires > > > currently implemented? > > > > > > Ryan > > > > > > > > > > > > On Wed, Jul 19, 2000 at 05:37:07PM +0800, Ken M. Mevand wrote: > > > > hi folks, > > > > i'm just starting to program in php, so please forgive > me if this > > > > question is dumb. > > > > > > > > here is my file layout : > > > > > > > > index.php > > > > |- templates > > > > | |-default.php > > > > | |-welcome.php > > > > > > > > i called index.php which includes default.php, which in > turn includes > > > > welcome.php. can the 2nd include in default.php be done using > > > > require("welcome.php") > > > > > > > > instead of > > > > require("templates/welcome.php") ? > > > > > > > > -ken > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > > For additional commands, e-mail: php-general-help@lists.php.net > > > > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > > > ---end quoted text--- > > > > > > > ---end quoted text--- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#8495) next »