yPHPz Smarty Šu—£ƒ ..
[
2ch
|
¥Menu
]
¡ƒRƒsƒyƒ‚[ƒh
ƒXƒŒ‚ð’Êí•\ަ
ƒIƒvƒVƒ‡ƒ“ƒ‚[ƒh
‚±‚̽گÄÞ‚ÌURL
¡€–ÚƒeƒLƒXƒg
272:nobody‚³‚ñ 08/10/14 03:44:58 >>268‚¶‚á‚È‚‚ĉSŽÒ‚¾‚¯‚ǂ‚‚Á‚Ă݂½[ ‚æ‚낵‚‚¨Šè‚¢‚µ‚Ü[‚· <? // ‚«‚傤‚‚¤(init.php) define('DS', DIRECTORY_SEPARATOR); define('TEMPLATE_DIR', 'tpl'); function include_template($name, $vars) { // ‚Ä‚«‚Æ‚¤‚É‚©‚ñ‚·‚¤‚ð‚Ä‚¢‚¬‚µ‚Ü‚· function h($str){ return htmlspecialchars($str); } function strip($str){ return preg_replace('/[\n\r]/', '', $str); } extract($vars); include TEMPLATE_DIR . DS . $name; } ?> 273:nobody‚³‚ñ 08/10/14 03:46:43 <? // ‚±‚ñ‚Æ‚ë[‚ç require_once 'init.php'; $rows = array( array('time'=>time(), 'name'=>'foo', 'value'=>1), array('name'=>'bar') ); include_template('tpl.php', compact('rows')); ?> <? // ‚Ä‚ñ‚Õ‚ê[‚Æ(tpl.php) ?> <? $title = 'ƒy[ƒWƒ^ƒCƒgƒ‹'; ?> <? include 'header.php' ?> <table> <? foreach((array) $rows as $row): ?> <? ob_start('strip') ?> <tr> <td><?=h ($row['time'] ? strftime('%T', $row['time']) : '00:00:00') ?></td> <td><?=h ($row['name']) ?></td> <td><?=h ($row['value'] ? $row['value'] : 'DEFAULT') ?></td> <tr> <? ob_get_flush() ?> <? endforeach ?> </table> <? include 'footer.php' ?> ‚Å‚àsmarty‚̃ƒ\ƒbƒhƒ`ƒFƒCƒ“‚Ä‚«‚Ȃ₂͂悢‚Æ‚¨‚à‚¢‚Ü‚·
ŽŸƒy[ƒW
ÅVƒŒƒX•\ަ
ƒXƒŒƒbƒh‚ÌŒŸõ
—ÞŽ—ƒXƒŒˆê——
˜b‘è‚̃jƒ…[ƒX
‚¨‚Ü‚©‚¹ƒŠƒXƒg
¥ƒIƒvƒVƒ‡ƒ“‚ð•\ަ
ƒŒƒXƒWƒƒƒ“ƒv
mixiƒ`ƒFƒbƒNI
Twitter‚É“Še
ƒIƒvƒVƒ‡ƒ“
‚µ‚¨‚è‚ð‹²‚Þ
ƒXƒŒƒbƒh‚É‘ž
ƒXƒŒƒbƒh‚̈ꗗ
‰É‚‚Ԃµ2ch
4992“ú‘O‚ÉXV/245 KB
’S“–:undef