smarty内容
来源:互联网 发布:中国护肤品市场 知乎 编辑:程序博客网 时间:2024/05/18 02:03
主要作用是在表单中提交文本使文本随按钮的作用在左边,在中间还是在右边。
————————————————————————————————————————————————————————————————————————————
<?php
include("libs/Smarty.class.php");
$s = new Smarty();
$s -> caching = 0;
$s->reInitSmarty("demo/templates","demo/templates_c");//通过自定义方法实现编译目录及界定符的修改
$s->assign("text",$_POST["text"]);
$s->assign("dq",$_POST["dqfs"]);
$s->display("if.tpl");
————————————————————————上为php文件——需要下载smarty模板的smarty.class.php.文件————————
————————————————————————下为html文件——————————————————————————————
<form action="if_smarty.php" method="post">
<input type="text" name="text" />
<input type="radio" value="left" name="dqfs" />left
<input type="radio" value="center" name="dqfs" />center
<input type="radio" value="right" name="dqfs" />right
<br />
<input type="submit" value="提交" />
</form>
————————————————————————————————下为tpl文件————————————————————————————
<body>
<{if $dq=='left'}>
<span style="float:left"><{$text}></span>
<{elseif $dq=='right'}>
<span style="float:right"><{$text}></span>
<{else}>
<center><{$text}></center>
<{/if}>
</body>
- smarty内容
- smarty内容
- smarty模版内容
- 【smarty】smarty模板引擎技术授课内容
- smarty 输出前内容过滤
- smarty不缓存内容怎么设置
- Smarty
- Smarty
- smarty
- smarty
- Smarty
- smarty
- smarty
- smarty
- smarty
- smarty
- smarty、
- smarty
- session和cookie的区别
- HTML
- 24与12小时的区别
- 11月 作业
- 泛型
- smarty内容
- HttpServletRequest
- String 和StringBuffer的区别:
- JSP简介
- Hibernate关系映射的配置属性解释
- 在使用直观升级升级到 SharePoint 2010 的自定义搜索页面上显示服务器功能区和“网站操作”菜单
- 建立对JSP的直观认识
- final, finally的区别:
- 事务操作