国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

php - tp template inheritance problem
給我你的懷抱
給我你的懷抱 2017-05-27 17:43:33
0
1
730

Use tp3.3 to create a background management system. I tried using tp's template inheritance and encountered a problem.
Example:
Add administrator method:

public function addC(){
    echo "1234";
    $this->display();
}

$this->dispaly();Displayed template page:
<extend name="./Application/Rbac/View/base.html" />
<block name=" content">
Form...
</block>

Problems encountered:
echo "1234"; cannot be displayed. I also have no way to var_dump($_POST) the data submitted by the form. This should be related to the mechanism of tp template inheritance. How should I modify the code? Thank you.

給我你的懷抱
給我你的懷抱

reply all(1)
小葫蘆

public function addC(){

$t =  "1234";
$this->assign('t',$t);
$this->display();

}

Template page
<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="UTF-8">
<title>Title</title>

</head>
<body>
<p>{$t}</p> //1234 will be displayed here
</body>
</html>
As for the form submission For data, ajax is usually used, and a new saveC method is created in the background to receive form data and complete the warehousing operation

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template