Zuber Mafat Zuber Mafat - 3 months ago 15
PHP Question

How to use session variables between subfolder in Codeigniter

My Project Folder structure :

=>TestProject (Main Folder)
- applicationOne
- applicationTwo


how to use applicationOnesession to applicationTwo directory?

Answer

I am not sure, but you have to point session path to same directory in both sub applications in below code https://github.com/bcit-ci/CodeIgniter/blob/develop/application/config/config.php#L377

$config['sess_save_path'] = 'path_of_session_directory'

and make sure your cookie domain is same in both application

Comments