smarty中post用法实例
发布时间:2020-12-12 20:31:54 所属栏目:PHP教程 来源:网络整理
导读:本篇章节讲解smarty中post用法。供大家参考研究。具体分析如下: 知道了smarty的运行原理之后,就想写个post的实现过程,以下是实现post的代码,跟独自写php代码差不多,只是多了显示文件 配置文件:conf.php 代码如下: template_dir ='templates/';
本篇章节讲解smarty中post用法。分享给大家供大家参考。具体分析如下: 知道了smarty的运行原理之后,就想写个post的实现过程,以下是实现post的代码,跟独自写php代码差不多,只是多了显示文件 配置文件:conf.php 代码如下: template_dir ='templates/';
$my->compile_dir ='templates_c/';
$my->config_dir ='configs/';
$my->cache_dir ='cache/';
?>
index.php
代码如下: assign('content','welcome to arrival');
$my->assign('mylife',array("生活","吃饭","梦想","凉风","报仇","fuck someone","fuck you die"));
$my->display('kk.html');
?>
template下的kk.html【index.php的显示文件】
代码如下: {html_select_time use_24_hours=true} |