开发者

used structdelete and now Elementemployee.id is undefined in SESSION

开发者 https://www.devze.com 2022-12-28 21:00 出处:网络
using coldfuion 9 I used structdelete(session,\"Elementemployee.id\") in one of my .cfm display files.Also

using coldfuion 9

I used structdelete(session,"Elementemployee.id") in one of my .cfm display files.Also in my application.cfc it defined as is

<cfset tArray[1][2] = "#session.employee_id#">

and the error is

 `Elementemployee.id is undefined in SESSION.` 

Is there a way that i can reset it without following the method shown below

 Navigate to the page Server Settings => Memory Variablesin the Coldfusion Administrator. Uncheck the option Use J2EE session variables and check the options E开发者_C百科nable Application Variables and Enable Session Variables. Click the button to submit the changes.


I'm not sure what your intent is. If you delete it, you are explicitly making it undefined.

Maybe you mean to set it to zero or the empty string, as in one of these?

<cfset session.employee_id = 0>
<cfset session.employee_id = ''>

Does that help?


Not quite sure what you're asking, but if you're trying to delete session.elementEmployee.id, try this:

<cfset StructDelete(session.elementEmployee, "id") />
0

精彩评论

暂无评论...
验证码 换一张
取 消