// controller 目錄下exends.php
class Controller_Extends extends Controller{
public function action_whj(){
$state = "whjsjq";
$expression = fappse; /whj');//呼叫視圖模版檔
$view->state = $state;//賦值視圖變數
$view->expression = $expression;//賦值視圖變數
$this->response->body ($view);
}
}
?>
//view/application目錄下whj.php
This will show if the expression is true): ?>
This will show if the expression is true.
Otherwise this will show.
呼叫https://192.168.0.170/ad/extends/whj
結果:
接 Ftherwther will show.whjsjq
以上就介紹了php kohana框架 view使用 ,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。