Re: Require() using relative path

From: Date: Wed, 26 Jul 2000 19:09:51 +0000
Subject: Re: Require() using relative path
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-8377@lists.php.net to get a copy of this message
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---

« previous php.general (#8377) next »