coldfusion

Scope of a Local variable in a cfm page?

纵饮孤独 提交于 2020-01-05 22:45:28
问题 The following is on a test.cfm page: <cfscript> Local.myString = "Hello"; </cfscript> What is the scope of myString ? Will it be visible in other parts of the cfm page or just between the <cfscript> tags where it was defined? 回答1: Outside of a function, that assigment sets a variable variables.local.myString , and the scoping rules of the variables scope are well documented: About scopes: variables. From the docs: The default scope for variables of any type that are created with the cfset and

Scope of a Local variable in a cfm page?

六眼飞鱼酱① 提交于 2020-01-05 22:45:12
问题 The following is on a test.cfm page: <cfscript> Local.myString = "Hello"; </cfscript> What is the scope of myString ? Will it be visible in other parts of the cfm page or just between the <cfscript> tags where it was defined? 回答1: Outside of a function, that assigment sets a variable variables.local.myString , and the scoping rules of the variables scope are well documented: About scopes: variables. From the docs: The default scope for variables of any type that are created with the cfset and

Scope of a Local variable in a cfm page?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-05 22:44:11
问题 The following is on a test.cfm page: <cfscript> Local.myString = "Hello"; </cfscript> What is the scope of myString ? Will it be visible in other parts of the cfm page or just between the <cfscript> tags where it was defined? 回答1: Outside of a function, that assigment sets a variable variables.local.myString , and the scoping rules of the variables scope are well documented: About scopes: variables. From the docs: The default scope for variables of any type that are created with the cfset and

cfc that bring in additional functions via include

与世无争的帅哥 提交于 2020-01-05 21:06:27
问题 My application.cfc starts with: <cfcomponent extends="org.corfield.framework"> later on void function setupApplication() output="false" { I have // tools include "initapp.cfm"; initapp.cfm has nothing but functions in it. Things like: <!--- Helper functions ---> <cfscript> string function stripHTML(str) output="false" { return REReplaceNoCase(arguments.str,"<[^>]*>","","ALL"); } application.stripHTML = stripHTML; </cfscript> The nature of the functions is NOT associated with a session. Is

cfc that bring in additional functions via include

流过昼夜 提交于 2020-01-05 21:05:12
问题 My application.cfc starts with: <cfcomponent extends="org.corfield.framework"> later on void function setupApplication() output="false" { I have // tools include "initapp.cfm"; initapp.cfm has nothing but functions in it. Things like: <!--- Helper functions ---> <cfscript> string function stripHTML(str) output="false" { return REReplaceNoCase(arguments.str,"<[^>]*>","","ALL"); } application.stripHTML = stripHTML; </cfscript> The nature of the functions is NOT associated with a session. Is

Parse array that contains input names and values back into a form as readonly

☆樱花仙子☆ 提交于 2020-01-05 13:09:26
问题 Background: I am going to save my ColdFusion forms data into an array and store that array into the column of a database. The only thing I will be doing with this array is making a call to the database for the data and parsing it back into my form but as "Read Only". The array will contain both the input name and value. Question: In ColdFusion after I have queried the database for the array data what would be the best process to parse the data back into my form? Do I have to recreate my form

Parse array that contains input names and values back into a form as readonly

牧云@^-^@ 提交于 2020-01-05 13:08:15
问题 Background: I am going to save my ColdFusion forms data into an array and store that array into the column of a database. The only thing I will be doing with this array is making a call to the database for the data and parsing it back into my form but as "Read Only". The array will contain both the input name and value. Question: In ColdFusion after I have queried the database for the array data what would be the best process to parse the data back into my form? Do I have to recreate my form

Using ColdFusion session variables in PHP

柔情痞子 提交于 2020-01-05 08:48:25
问题 I have a ColdFusion website that is currently running well with login/register modules. I want to use my ColdFusion session in PHP. Can this be achieved? 回答1: As mentioned in the comments, no it's not really possible. CF and PHP cannot share in memory sessions variables. However, there are other alternatives such as using cookies. I used that approach once because a client wanted to share sessions with PHP Forum software. I simply grabbed it using cookies, by finding what cookies were being

Having some trouble understanding loops

独自空忆成欢 提交于 2020-01-05 08:20:28
问题 I created this for some reason neither one of the queries are being updated <cfloop index="i" from="1" to="#ArrayLen(location)#"> <cfif location[i] NEQ "" AND #locationID# EQ "" > <cfquery Name="UpdateAddActivity" DATASOURCE="#DS#"> INSERT INTO tblProjectLocations ( projectID, locationID ) VALUES ( #ProjectName#, #location[i]# ) </cfquery> </cfif> <cfif location[i] EQ "" AND #locationID# NEQ "" > <cfquery Name="UpdateAddActivity" DATASOURCE="#DS#"> DELETE FROM tblProjectLocations WHERE

Implement monkehTweets on Coldfusion Server

天大地大妈咪最大 提交于 2020-01-05 08:07:26
问题 I've inherited a site running Coldfusion, and I'm trying to get a twitter feed on the site. I've found a tool that seems to do the job, and I've registered my app with Twitter and I have my client and OAuth codes. The problem is that I'm not familiar enough with Coldfusion to know exactly what code I need to put on the page in question to pull the tweets. This is the library I'm using: https://github.com/coldfumonkeh/monkehTweets From what I can gather, my code should look something like this