Smarty都能傳遞什麼參數
普通變量 string bool int
數組 array
常量 define、const定義的
系統常量 等等
Smarty全局變量接收
<!-- 接收GET傳遞的參數id --> {$smarty.get.id}
php 頁面中傳遞值,smarty在html中能接收到
http://localhost/Smartry/controller.php?id=33
常量
{$smarty.const.CC}
<?php include './Vendor/Smarty.class.php'; $smart=new Smarty(); define("CC","中國製造"); $smart->display('my.html');