fetch() ÀÌÀü    ´ÙÀ½    ¸ñ·Ï
string fetch( string file_id )
print_() ¸Þ¼­µå¿Í °°À¸³ª 󸮰á°ú¸¦ Ãâ·ÂÇÏÁö ¾Ê°í ¸®ÅÏÇÕ´Ï´Ù.
mail.php
...
$tpl->define(array(
    'content'=>'greeting.tpl',
    'mail'   =>'mail.tpl',
));
...
$tpl->assign(array(
    ...
));
$mail_body = $tpl->fetch('mail');
...
mail.tpl
<table>
<tr><td>this is mail..</td><tr>
<tr><td>{# content }</td><tr>
</table>
ÀÎŬ·çµå¸í·É¾î '#' ¿Í print_() ´ë½Å ¾Æ·¡¿Í °°ÀÌ ÇÒ ¼öµµ ÀÖÀ¸³ª È¿À²ÀûÀÌÁö ¾Ê½À´Ï´Ù.
index.php
...
$tpl->define(array(
    'xxtop' =>'top.tpl',
    'xxmain'=>'main.tpl',
    'layout'=>'layout.tpl',
));
...
$tpl->assign(array(
    ...
));
$tpl->assign(array(
    'top' =>$tpl->fetch('xxtop'),
    'main'=>$tpl->fetch('xxmain'),
));
//$tpl->print_('layout');
echo $tpl->fetch('layout');
layout.tpl
<table>
<tr><td>{ top  }</td><tr>
<tr><td>{ main }</td><tr>
</table>
 ÀÌÀü ¸ñ·Ï ´ÙÀ½ 
 
2003-03-03 ~