gpt4 book ai didi

php - 打印 Smarty 模板中可用的所有变量

转载 作者:IT王子 更新时间:2023-10-29 01:14:40 24 4
gpt4 key购买 nike

如何打印 Smarty 模板上下文中可用的所有变量?类似于 Django 调试跟踪,它列出了正在传递的所有内容。

谢谢

最佳答案

使用{调试} From the manual :

{debug} dumps the debug console to the page. This works regardless of the debug settings in the php script. Since this gets executed at runtime, this is only able to show the assigned variables; not the templates that are in use. However, you can see all the currently available variables within the scope of a template.

$debugging = true 必须在您的设置或类中启用,并且必须取消阻止站点弹出窗 Eloquent 能看到该窗口

关于php - 打印 Smarty 模板中可用的所有变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/716916/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com