RE: [PHP4BETA] OT? super included needed....

From: Date: Wed, 10 May 2000 15:20:36 +0000
Subject: RE: [PHP4BETA] OT? super included needed....
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-14754@lists.php.net to get a copy of this message
Isnt such a function written in php in a matter of minutes? > -----Original Message----- > From: Soulhuntre [mailto:soulhuntre@soulhuntre.com] > Sent: Wednesday, May 10, 2000 12:05 > To: php4beta@lists.php.net > Subject: [PHP4BETA] OT? super included needed.... > > > Hiya :) > > The last time I had a fast question like this, this list was kind > enough to > help me out - in fact I contracted a PHP programmer from a reply > to my last > desperat need :) > > Hopefully, this is not too off topic, if so, I will not post any future > questions here in this way. > > One of the reasons to put it HERE is that this is the best place to find > PHP4 savvy people... > > Why post? > ========= > > I am fairly sure someone has one of these floating around out there! > > The problem > =========== > > I want to be able to "include" files into my webpages, but also > maintain the > ability to over-ride the files if need be. > > So, consider.... > > / > index.html > snippets/ > menu.html > footer.html > > department1/ > index.html > people.html > > department2/ > index.html > costs.html > snippets/ > menu.html > > inventory/ > index.html > > > Postulate a function, called "super_include( filename, extradir )" where > filename was something to be found ( menu.html? ) and extradir > was the name > of a optional supplemental directory ( snippets ). > > In the case of /department2/inventory/index.html, super_include( > 'menu.html', 'snippets' ) should find and include > /department2/snippets/menu.html. > > In the case of /department2/inventory/index.html, super_include( > 'footer.html', 'snippets' ) should find and include /snippets/footer.html. > > In the case of /department1/index.html, super_include( 'footer.html', > 'snippets' ) should find and include /snippets/footer.html. > > In theory, this could nest rather deeply, with each file picking up the > element "deepest" that satisfies the needs if super_include. > > In a perfect world, it would do this in URL-space, not filesystem-space so > that it woudl know enough to stop at the top level of the > website... BUT if > if had to happen at the filesystem level (the directory > functions) a config > file could define the highest level to go to. > > > > Ken > > --- > Soulhuntre > > (icq# 275066) > http://www.soulhuntre.com - my world > http://www.dotpublishing.com - my income > http://www.virtualchemy.com - my company > http://www.the-estate.com - my passion > > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net >

« previous php.version4 (#14754) next »