smarty的作用和优点

<?require("inc/php_inc.php");

require("inc/Smarty-2.6.26/libs/Smarty.class.php");

require("uio_pubdata.php");

$var["str_url"]="<a href='".FOLDER."index.php'><span class='daoa' >ホーム</span></a> " . $cfg["split_uri"] . " ";

$var["str_url_2"]="Your Shopping Cart Contents";$var["title"] = $var["str_url_2"] . " - " . $var["title"];

//----加载SMARTY变量------------//-----------------------------

$sql="select content,id from `infoclass` where id in (" . dataDefault(join(',',$info),0) . ")" ;

$rs=query($sql);

while($rows=fetch($rs)){

$var["content_" . $rows["id"] ] = $rows["content"];

}

free($rs);

require("uio_bomdata.php");

$var["process"]=formatNumber(timing_current()*1000);

$var["memry"]=formatNumber(memory_get_usage()/1024);

foreach ($var as $key=>$value){

$smarty->assign($key,$value);

}unset($var);

$smarty->register_outputfilter('remove_dw_comments');

timing_stop();

$smarty->debugging = false;

$smarty->display('lay_shopcart.html');

require("uio_bomdata2.php");

?>

你可能感兴趣的:(smarty)