First.. here's the synopsis of what I'm trying to do:

I'm working on a site where everything is based off a really simple template
system I'm using, see the chunk of my index page that deals with the plates
for example:

---------------------------------------------
$tmpl_file = fopen ("./template.htm", "r");
$tmpl = fread($tmpl_file,16000);
$tmpl = str_replace("{title}", "$title", $tmpl);
$tmpl = str_replace("{header}", "$header", $tmpl);
$tmpl = str_replace("{header_url}", "$header_url", $tmpl);
$tmpl = str_replace("{header_home}", "$header_home", $tmpl);
$tmpl = str_replace("{header_cat}", "$header_cat", $tmpl);
$tmpl = str_replace("{header_caturl}", "$header_caturl", $tmpl);
$tmpl = str_replace("{header_title}", "$header_title", $tmpl);
$tmpl = str_replace("{pretext}", "$pretext", $tmpl);
$tmpl = str_replace("{content}", "$content", $tmpl);
$tmpl = str_replace("{content_source}", $page_source, $tmpl);

eval("echo \$tmpl;");
---------------------------------------------

The template file looks like "blah.. blah.. {title}.." the code above then
takes the {blah} tags, and turns them into variables, which are defined in
the actual content pages (which are included (via an include(); function..)

The content files appear as:

---------------------------------------------
$title = "testing";
$content = "etc";
---------------------------------------------

And so on..

My problem is.. that when I do something like

---------------------------------------------
$content = show_source("/path/to/file");
 // or
$content = "Blah.. blah.. ".include("/some/file").".. some more blah..";
---------------------------------------------

It includes the files (or executes the code that is assigned to the
variable), however it all appears OUTSIDE the template. To see what I'm
saying, see http://olypen.com/ryan/go/main/news or
http://olypen.com/ryan/go/source/source_index .. that will give you a better
idea as to what I'm saying.

Anyone have any thoughts/explanations as to why this is happening? I can
provide more source.. or info if needed.

Thanks in advance!

-Ryan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to