Re: shtml includes

From: Date: Sun, 01 Jul 2001 13:21:34 +0000
Subject: Re: shtml includes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55728@lists.php.net to get a copy of this message
Hello, you may try Smarty, a very skillful PHP template processor. AFAIR, Smarty can handle includes in that way you want. http://www.phpinsider.com/php/code/Smarty/ Papp Gyozo - pgerzson@freestart.hu ----- Original Message ----- From: "Jamie Saunders" <jamie.s@btinternet.com> To: "PHP General" <php-general@lists.php.net> Sent: 2001. július 1. 12:05 Subject: [PHP] shtml includes > Hi, > > In my site I use shtml extensively. Therefore I have quite a number of > text files that serve as shtml includes. Often these text files contain > more shtml includes. I'm creating PHP pages and wish to use these text > files within the pages, I know how to do this easily enough by using: > include("textfile.txt"); The problem is that because a lot of these text > files contain more includes the PHP pages are passing them over, as it > cannot deal with the shtml <!-- include --> tag. Here's a brief example: > > script.php: > <? > include("text1.txt"); > ?> > > text1.txt: > <html> > <!-- include file="text2.txt" --> > </html> > > What I would like to happen is for the PHP script to be able to look for the > <!-- include --> tags within the text files and parse them as PHP > include(""); tags. Is there any way of achieving this? > > Thanks. > > Jamie Saunders > > > > -- > 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 (#55728) next »