问题描述:

I have a problem with session in laravel , I use cookies driver

In localhost works fine , but in shared hosting (Hostgator) dosen't work

Same code.

This is the code in Route.php

Route::get('/SetSession',function(){

Session::put('Domain','http://example.com');

return Session::get('Domain');

});

Route::get('/GetSession',function(){

return Session::get('Domain');

});

I don't know what is the problem , in shared host empty value , but in localhost works fine.

session.php file

http://paste.ofcode.org/XPeC3zb6f898tcsxUthSGg

网友答案:

Yes , I found a problem , I have a space before php tag in Route.php

Like this :

   <?php 


?>
相关阅读:
Top