thinkphp3.2.3 How to use the assign function in function.php in the Common file in the module
伊谢尔伦2017-05-24 11:33:38
0
3
589
I am new to TP, because the function.php in the Common file in the module is a public function file, not a class file. What should I do if I want to use the assign function in the framework directly in the function
Create a new class file and create a method in it to allocate variables, then create a new class in function.php, and then call the method in it to allocate variables
What you are doing is totally unreasonable. You call the allocation variable in the method. Why not allocate it in the public categories?
return
Create a new class file and create a method in it to allocate variables, then create a new class in function.php, and then call the method in it to allocate variables