ColdFusion 在页面更改时更改会话变量
ColdFusion 有没有办法在页面更改后更改会话变量? - 特别是在页面更改为特定页面之后?
Goes to one page --> change session variable
Goes to a different page --> change session variable to something else
Is there a way in ColdFusion to change a session variable after a page change? - Especially after a page change to a specific page?
Goes to one page --> change session variable
Goes to a different page --> change session variable to something else
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在现有页面中添加代码吗?加载 importantpage.cfm 后,您可以在页面顶部运行它
这应该可以完成您正在寻找的内容。
您还可以将
标记添加到 application.cfm/cfc 文件中Can you add code to the existing page? When importantpage.cfm is loaded you could run this at the top of the page
<cfset session.variable = 'important page loaded'>
That should accomplish what you are looking for.
You could also add
<cfset>
tags to your application.cfm/cfc file您可以在 application.cfm 或 application.cfc 中对其进行管理,然后这将延续到应用程序中的每个页面和子文件夹。您只需使用 CGI 变量作为页面名称执行 if 语句即可。
You can manage this in application.cfm or application.cfc and then this will carry over to every page and subfolder in your application. You would just do an if statement using the CGI variable for the name of the page.