Home >Backend Development >PHP Tutorial > 模板赋值assign解决方法
模板赋值assign
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->$connect = mysql_connect('127.0.0.1', 'root', '123456'); mysql_select_db('456789', $connect); mysql_query('set names gbk'); $sql = "select code from shop"; $query = mysql_query($sql); $carts = array( 'orders_id' => $cart->OrdersId, 'cart_count' => $cart->cartCount(), 'price_count' => $cart->priceCount() ); $dtp = new DedeTemplate(); $dtp->Assign('carts',$carts); $dtp->LoadTemplate(_PLUS_TPL_.'/car.htm'); $dtp->Display(); exit;