Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

Session in other file


Reply


2 Posts   1127 Views

Avatar
Edska

Community Member, 1 Post

5 January 2009 at 4:34am

Edited: 05/01/2009 4:36am

Helllo,
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

Avatar
Hamish

Community Member, 712 Posts

5 January 2009 at 3:37pm

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