if.php文件
<?php
include("libs/Smarty.class.php");
$smarty=new Smarty();
$smarty->template_dir="demo/templates";//更新模版存放路径及编译路径
$smarty->compile_dir="demo/templates_c";//更新编译路径
$smarty->left_delimiter="<{";//修改界定符
$smarty->right_delimiter="}>";
$smarty->config_dir = "demo/configs";
$smarty->caching=0;
$smarty->assign("s",$_POST["text"]);
$smarty->assign("f",$_POST["dqfs"]);
$smarty->display("if.tpl");
?>