Tuesday, March 30, 2010

Re: I can't get the value of session in controller

Have you tried using the session component and helper instead of accessing the session directly?

Jeremy Burns
jeremyburns@me.com


On 30 Mar 2010, at 09:33, Rimoe wrote:

> hi,
>
> everyone,
>
> I have set a session in aa.php
> (
> session_start();
> $_SESSION['aa'] = '12345';
> )
> I can read the value in bb.php
> (
> session_start();
> echo $_SESSION['aa'] ;
> )
>
> but I can't read the value in any aaas_controller.php.
> (
> echo $this->Session->read('aa');
> echo $_SESSION['aa'];
> )
> do anyone know why is it?
>
> Thank you very much
>
> rimoe
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: