Help with file inclusion
Posted: Sat Apr 01, 2006 5:53 am
Hello, I am currently working on a simple content management system for my website and hopefully others.
I have a series of files (html) and I previously have simply been include() ing them into my design dynamically..
Suppose I had this file:
And I added this:
I would then like to be able to read the file, and include the file specified there, so the eventual output would be:
At first glance this didn't seem to daunting, I used regular expressions to find the ~ indicated area, and replaced them with <?php include('blah'); ?>. However I would now like to pass this to the PHP interpreter, as if it were a seperate file, so that the include statements are processed. Do i have to write it to a temporary file to do this?
Blah, may be hard to understand, sorry bout that.
I have a series of files (html) and I previously have simply been include() ing them into my design dynamically..
Suppose I had this file:
Code: Select all
Hello World!Code: Select all
Hello World ~~~IncludeFile:otherfiletoinclude.php~~~Code: Select all
Hello World This is the contents of otherfiletoinclude.phpBlah, may be hard to understand, sorry bout that.