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.
public function addC(){
}
Template page
<!DOCTYPE html>
<html lang="en">
<head>
</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