Process PHP Script in HTML Template
I've been working on a template system for the past few weeks. Here's a
basic rundown of the function. I use file_get_contents() to get the HTML
template, then I use a parameter replacement function to replace variables
wrapped in %'s (ex: %title% replaced by <title> Here's my title!
</title>).
After both of those, I use return to, for lack of a better word, return,
the parameter-filtered data. But, what would be the best way to execute
PHP? One idea I had was simply including the parameter-filtered page into
index.php, but I can't really do that.
Keep in mind, I want this to be a flexible script, so please make it so I
can write the code straight into my function.
No comments:
Post a Comment