[英]Coldfusion - Session.dsn Confusion
I'm being tasked to help with a slow takeover of a large ColdFusion app for our organization. 我的任务是帮助公司缓慢接管大型ColdFusion应用程序。 I'm not finding the syntax or functions terribly hard to understand, but I do have one thing I can't find an answer to:
我没有发现很难理解的语法或功能,但是我有一件事我找不到以下答案:
<cfquery name="testquery" datasource="#Session.dsn#">
My question is simple: (at least it sounds that way:) 我的问题很简单:(至少听起来是这样的:)
What is "#Session.dsn#" referrring to? “#Session.dsn#”指的是什么?
As best I can tell, it's not a user defined variable, but something built into CF. 尽我所知,它不是用户定义的变量,而是CF中内置的东西。 Am I wrong there?
我在那里错了吗? If I were to take a stab, I would say that it is a generic variable referring to the database that is currently assigned to the site.
如果我要刺,我会说这是一个泛型变量,它指向当前分配给该站点的数据库。 I have not gone through the setup process or configuring of CF admin, as that way already done for this project.
我尚未经历CF管理员的设置过程或配置,因为该项目已经完成了这种工作。 Am I far off in my guess?
我猜我还差得远吗?
As the comments say, it is most likely a Datasource Name. 正如评论所说,它很可能是数据源名称。 You should dump it to know for sure:
<cfdump var='#Session.dsn#'>
. 您应该转储它以确保确定:
<cfdump var='#Session.dsn#'>
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.