Welcome Guest, Not a member yet? Register   Sign In
Finding the suitable way to store CI session
#2

[eluser]noideawhattotypehere[/eluser]
./application/libraries/MY_Session.php
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Session extends CI_Session
{

    function sess_update()
    {
       if ( !IS_AJAX )
       {
           parent::sess_update();
       }
    }

}

./application/config/constants.php
Code:
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');


Messages In This Thread
Finding the suitable way to store CI session - by El Forum - 11-05-2013, 08:34 PM
Finding the suitable way to store CI session - by El Forum - 11-06-2013, 12:32 AM
Finding the suitable way to store CI session - by El Forum - 11-06-2013, 04:56 AM
Finding the suitable way to store CI session - by El Forum - 11-07-2013, 10:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB