ThinkPHP3.2.3 the method of establishing the project template is a bit different from the previous version directory, create a new index directory under the home/view/directory, and then create a new template, such as index.html, test.html, as if there is a "Tpl" in the root directory Directory, under the new index directory
Use
If it is a different name for HTML, such as test.html
So how do you assign a value to a template? The following will use the $this-> variable name and $this->assign ("Variable name", "Variable Value"), and two ways to assign a value
In the IndexController.class.php file
name = $name; $this->assign ("Variable name", "Variable Value"); $this->assign ("Age", "->assign") ("date", $date); $this->display (); } Public function User () {}}
How do I use index.html in a template?
Insert Title hereHello World
"; Echo $date;? >
Output results
Generally use $this->assign () to assign values that can be continuously assigned as
$this->assign ("Age", "->assign") ("date", $date);
The above describes the ThinkPHP323 set up project templates and template assignments, including aspects of the content, I hope to be interested in PHP tutorial friends helpful.