Smarty
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
*Smarty [#q63ead2e]
#contents
{literal}
<script language="javascript">
</script>
{/literal}
[$hoge|escape|lnl2br}
<?php
require_once('Smarty.php');
// smarty
$smarty = new Smarty();
$smarty->template_dir = "./templates/";
$smarty->compile_dir = "./templates_c/";
$smarty->config_dir = "./configs/";
$smarty->cache_dir = "./cache/";
$smarty->caching = true;
$smarty->cache_lifetime = 600; // 10分
$smarty->compile_check = false;
if (!$smarty->is_cached("template.tpl")) {
}
$smarty->display("template.tpl");
?>
<?php
require_once('Smarty.php');
// smarty
$smarty = new Smarty();
$smarty->template_dir = "./templates/";
$smarty->compile_dir = "./templates_c/";
$smarty->config_dir = "./configs/";
$smarty->cache_dir = "./cache/";
$smarty->caching = true;
$smarty->cache_lifetime = 600; // 10分
$smarty->compile_check = false;
userid = session_id();
if (!$smarty->is_cached("template.tpl", userid)) { // us...
}
?>
**foreach [#o34fe7f7]
{foreach from=$items item=i name=items}
{$smarty.foreach.items.index}
{/foreach}
**for-next [#q89e3063]
{section name="page" loop=10}
{$smarty.section.page.index+1}<br>
{/section}
{if ($arr|@count) < 5}
hoge
{else}
fuga
{/if}
終了行:
*Smarty [#q63ead2e]
#contents
{literal}
<script language="javascript">
</script>
{/literal}
[$hoge|escape|lnl2br}
<?php
require_once('Smarty.php');
// smarty
$smarty = new Smarty();
$smarty->template_dir = "./templates/";
$smarty->compile_dir = "./templates_c/";
$smarty->config_dir = "./configs/";
$smarty->cache_dir = "./cache/";
$smarty->caching = true;
$smarty->cache_lifetime = 600; // 10分
$smarty->compile_check = false;
if (!$smarty->is_cached("template.tpl")) {
}
$smarty->display("template.tpl");
?>
<?php
require_once('Smarty.php');
// smarty
$smarty = new Smarty();
$smarty->template_dir = "./templates/";
$smarty->compile_dir = "./templates_c/";
$smarty->config_dir = "./configs/";
$smarty->cache_dir = "./cache/";
$smarty->caching = true;
$smarty->cache_lifetime = 600; // 10分
$smarty->compile_check = false;
userid = session_id();
if (!$smarty->is_cached("template.tpl", userid)) { // us...
}
?>
**foreach [#o34fe7f7]
{foreach from=$items item=i name=items}
{$smarty.foreach.items.index}
{/foreach}
**for-next [#q89e3063]
{section name="page" loop=10}
{$smarty.section.page.index+1}<br>
{/section}
{if ($arr|@count) < 5}
hoge
{else}
fuga
{/if}
ページ名: