Jump to:

23332 Posts in 17302 Topics by 2859 members

General Questions

SilverStripe Forums » General Questions » about Silverstripe session

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1215 Views
  • bebabeba
    Avatar
    Community Member
    192 Posts

    about Silverstripe session Link to this post

    Hi!
    I read about session and I have a lot of doubt about it.
    Silverstripe set session in main.php with Session::start().
    When Silverstrupe write or update session? Is possible save data in session in every part of my site? For exampe in Page.php or not (this question is connect with time to long for writing ad reading data in session)?
    If I set a session varaible for example $_SESSION['test']=$xml->saveXML(); can I repeat this action more then one time in my Page.php function? Or si there an exact point in witch is better to execute and only one time?

    Thanks..

  • bebabeba
    Avatar
    Community Member
    192 Posts

    Re: about Silverstripe session Link to this post

    any idea???

  • martimiz
    Avatar
    Forum Moderator
    1066 Posts

    Re: about Silverstripe session Link to this post

    you can use the SilverStripe Session object and do Session::set('name', 'jack'); or Session::get('name');

    multiple session vars isn't a problem, and you can set them from anywhere, but I guess there's always the chance a session times out if a user stays too long on a page...

    1215 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.