Jump to:

23552 Posts in 19349 Topics by 2891 members

General Questions

SilverStripe Forums » General Questions » Session in other file

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: 1119 Views
  • Edska
    Community Member
    1 Post

    Session in other file Link to this post

    I have one problem. I want to add session to file that doesn't belong to silver stripe. For example I have a file called file.php in folder placed near siler stripe folders mysite, sapphire, themes and so on. I want to use - Session::get("variable") in my file.php. I tried to include Session.php, Controller.php, but i can't get my session variable. I get Fatal error: Class 'Session' not found in /xxx/xxx/xxx/xxx/public_html/gui/file.php on line 3

  • Hamish
    Community Member
    712 Posts

    Re: Session in other file Link to this post

    Your path to Session.php must be incorrect. What does your directory structure look like?

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.