您好,欢迎访问一九零五行业门户网

PHP之Smarty学习

参考网络上的资料,使用smarty可以简单的测试:
1.解压smarty到网站目录下,比如起名libs.
2.建立templates,templates_c,configs,cache目录
3.建立测试页面:index.php
assign(title, 测试用的网页标题);
$tpl->assign(content, 测试用的网页内容);
// 上面两行也可以用这行代替
// $tpl->assign(array(title => 测试用的网页标题, content => 测试用的网页内容));
$tpl->display('index.htm');
?>
4.在templates下建立模板文件index.htm
其它类似信息

推荐信息