Location: PHPKode > scripts > STC > stc/example.tpl
<html>
<head>
<title>{test}</title>
</head>
<body>
var demo:<br />
<hr />
{now}<br />
{helloword}:welcome to {_get.name}
<hr><br />
if demo:<br />
<hr />
<!-- if array.a == 1 -->
the array.a value is : {array.a}
<!-- endif -->
<br />
<!-- if _get.do == 'test' -->
your request action is test
<!-- else -->
you action is unkonw
<!-- endif -->
<br />
<!-- if tplvar > 9 -->
the value is 9
<!-- elseif tplvar == FALSE -->
the tplvar is undefined.
<!-- endif -->
<hr /><br />
Cylce Demo:<br />
<hr />
<!-- section for from array -->
{__C}:{__K}=>{for}<br />
<!-- endsection -->
<br />
<!-- section fordemo from demo -->
<!-- section array2 from fordemo -->
Count:{__C}=>{__K}={array2} <br />
<!-- endsection -->
<!-- endsection -->
<hr /><br />
Import Demo:
import the import.tpl.php
<!-- import 'import.tpl' -->
Function Demo:
<!-- func('hi~') -->
<!-- date("date('Y-m-d H:i:s')",time) -->
Class Demo
<!-- testclass::test('hello') -->
</body>
</html>
Return current item: STC