Home > Backend Development > PHP Tutorial > php kohana framework view usage

php kohana framework view usage

巴扎黑
Release: 2016-11-11 09:31:42
Original
1595 people have browsed it

// Exends.php in the controller directory
class Controller_Extends extends Controller{
public function action_whj(){
$state = "whjsjq";
$expression = false;
$view = View::factory(' application/whj');//Calling the view template file
$view->state = $state;//Assigning the view variable
$view->expression = $expression;//Assigning the view variable
$this->response-> body($view);
}
}
?>


//whj.php in the view/application directory

This will show if the expression is true.

Otherwise this will show.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template