当前位置:网站首页>Thinkphp5 frequently asked questions
Thinkphp5 frequently asked questions
2022-07-29 06:44:00 【hljqfl】
1. Controllers in different modules call each other .
use application \ modular \controller\ Controller name
for example :
use app\pub\controller\Header;
$top=new Header;// Call the controller under other modules
$top->info();
2. Render template files under different modules in the controller
return $this->fetch('[email protected]/top');// Module name @view Name of lower folder / Template name
3. In the template file, load the template files under different modules
{include file="[email protected]/top" /}<!-- Module name @view Name of lower folder / Template name -->
3. The template file inherits the template files under different modules
{extend name="[email protected]/base"}<!-- Module name @view Name of lower folder / Template name -->
边栏推荐
猜你喜欢
Sequence list and linked list
day17_ Under collection
Using STP spanning tree protocol to solve the problem of two-layer loop in network
OpenResty的核心与cosocket
day09_static&final&代码块&抽象类&接口&内部类
Arrays&Object&System&Math&Random&包装类
day12_ Multithreading
Hongke shares | how to test and verify complex FPGA designs (1) -- entity or block oriented simulation
四、 局域网和城域网
LDAP简述及统一认证说明
随机推荐
CNAME记录和A记录的区别
Hongke share | let you have a comprehensive understanding of "can bus errors" (IV) -- producing and recording can errors in practice
Clickhouse failed to import CSV without error but no data
day14_ Unit test & Date common class & String common class
What is the lifecycle of automated testing?
How to use SFTP command to access SFTP server on the development board
TCP socket communication experiment
What are the advantages of software testing? See how much you know
Complex floating point division of vivado IP core floating point
Hog+svm for pedestrian detection
DDoS攻击与CC攻击的区别
Instant 新日期类的使用 API
VMware虚拟机在物理机win10系统下如何连接外网
解决文件大导致磁盘满的问题
greenplum企业部署
Floating point addition and subtraction method of vivado IP core floating point
Hongke automation SoftPLC | modk operation environment and construction steps (1) -- Introduction to operation environment
如何在开发板上使用sftp命令访问sftp-server
The difference between DDoS attack and CC attack
Floating point square root of vivado IP core floating point