Показать сообщение отдельно

  #5151  
Старый 30.08.2008, 18:57
Jer1cho
Участник форума
Регистрация: 06.06.2008
Сообщений: 162
Провел на форуме:
3942177

Репутация: 244
Отправить сообщение для Jer1cho с помощью ICQ
По умолчанию

Можно и без smarty, если я так понял:
PHP код:
<?php
$shablon 
'<html>
 <head>
    <title>test</title>
 </head>
 <body>
    {MENU}
 </body>
</html>'
;
$menu "<a href=\"#\">Меню</a>";
$men str_replace ("{MENU}"$menu $shablon );
echo 
$men;
?>
На smarty:
PHP код:
<?php
require_once('./Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir './templates/';
$smarty->compile_dir './templates_c/';
$smarty->config_dir './configs/';
$smarty->cache_dir './cache/';

$smarty->assign('menu''Меню');
$smarty->display('shablon.tpl');
?>

Последний раз редактировалось Jer1cho; 30.08.2008 в 19:28.. Причина: Теги не закрыл =))
 
Ответить с цитированием