thinkphp中display能傳參數嗎
2 回答

蠱毒傳說
TA貢獻1895條經驗 獲得超3個贊
display()在默認輸出對應的模板時,可以不用攜帶參數;同時其靈活的支持更多攜帶參數的操作:
輸出當前模塊的其他操作模板
1 | $this ->display( '操作名' ); |
輸出其他模塊的操作模板
1 | $this ->display( '[分組名:]模塊名:操作名' ); |
輸出其他主題的操作模板
1 | $this ->display( '主題名@模塊名:操作名' ); |
全路徑輸出模板
1 | $this ->display( '模板文件名' ); |
指定頁面編碼
1 | $this ->display( '模板' , '編碼' ); |
輸出其他格式模板
1 | $this ->display( '模板' , '模板格式' ); |
隨著版本的升級,不排除更多參數支持的可能
- 2 回答
- 0 關注
- 724 瀏覽
添加回答
舉報
0/150
提交
取消