I need to save the output of some dynamic php from a postcard program (when user in his email message clicks on the getpostcard.php?id= link) into a file (preferably html). I'm trying to insert the file functions in getpostcard.php as shown below, but the $t variable will not get put into the file created (because it gets parsed into the template*.ihtml template):
$t->set_file(array('body' => $card_template .'.ihtml'));
$t->set_var(array(
'T_SiteName' => $SiteName,
'T_SiteURL' => $SiteURL,
'T_SenderName' => $ecard_sname,
'T_SenderEmail' => $ecard_semail,
// more variable pointers here
));
$t->parse("output","body");
$newstring = "$t";
$filename = "file.htm";
$newfile = @fopen($filename, "w+") or die("Cant.");
@fwrite($newfile, $newstring) or die("Cant.");
fclose($newfile);
so, what is the best way to combine both the $t being fed into the template*.ihtml, then into a $newstring that can be placed into a file?
Thanks
WebVegas