Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use $_SESSION variable in cakephp 2.2

I am using a java script plug-ins to upload multiple images. Fro that I have use a server side script with is with the plug-ins. In that php file I have $_SESSION variable to assign a value in session. But when I am trying to access that session in my controller's method. I have store my javascript file and its corresponding php file in webroot. Is there any way to get session from webroot into controller.

like image 457
Amar Banerjee Avatar asked Jul 31 '26 06:07

Amar Banerjee


1 Answers

In your php file in webroot, where you have session_start();, try changing it to the following:

session_name('CAKEPHP'); 
session_start(); 
like image 110
SharkofMirkwood Avatar answered Aug 01 '26 19:08

SharkofMirkwood



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!