shtml includes

From: Date: Sun, 01 Jul 2001 10:05:11 +0000
Subject: shtml includes
Groups: php.general 
Request: Send a blank email to php-general+get-55722@lists.php.net to get a copy of this message
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

« previous php.general (#55722) next »