Basicaly我有一个名为VAR的智能变量,如果它的值是'1',它应该包括文件number1,否则它应该包含文件number2,但是我似乎无法使它工作。我有两个页面,一个PHP页面分配变量,另一个页面使用Smarty代码:
include_once('lib/smarty/Smarty.class.php');$smarty = new Sm
我使用的是Smarty和PHP。如果我有一个模板(文件或字符串),有没有办法让smarty解析该文件/字符串并返回一个包含该模板中所有smarty变量的数组?How are you on this fine {$dayofweek} morning";// $varsshould now be array( "name", &quo
我有默认的模板文件(main.tpl),并且我想在<body>标记之间包含子页面。因此,当用户点击expample on link News时,它将显示与main.tpl组合的news.php ($smarty->display("news.tpl");)Hello, <php echo $username ?>. Some random text.