Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$this->need()模板引入功能希望增加参数传递 #1742

Open
xiaopanglian opened this issue Mar 7, 2024 · 1 comment
Open

$this->need()模板引入功能希望增加参数传递 #1742

xiaopanglian opened this issue Mar 7, 2024 · 1 comment
Labels
enhancement Enhancement request

Comments

@xiaopanglian
Copy link

xiaopanglian commented Mar 7, 2024

希望增加$this->need()模板引入的参数传递功能,当我在引用模板时,可以把上级页面查询出的数据通过参数的方式传递给模板,模板直接使用

$this->need('child.php' ,$param);

child.php页面通过某种方式来接收传递的$param参数
这可以减少动态模板页对数据库的请求

@xiaopanglian xiaopanglian added the enhancement Enhancement request label Mar 7, 2024
@benzBrake
Copy link
Contributor

没必要啊 global 或者 $this->xxx = xxx 都是可以的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request
Projects
None yet
Development

No branches or pull requests

2 participants