模板:
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
This is a test!<br/>
<if condition="$num gt 10">num 大于10
<elseif condition="$num lt 10"/>num小于10
<else/>num等于10
</if>
</body>
</html>
Control:
<?php
// 本类由系统自动生成,仅供测试用途
class IndexAction extends Action {
public function index(){
$num = 15;
$this->assign('num',$num);
$this->display();
}
}