/var/www/hkosl.com/demo_google/application/core/MY_Security.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
    
class MY_Security extends CI_Security {

        public function 
__construct()
        {
            
parent::__construct();
        }

        public function 
csrf_show_error()
        {
            if(
session_id() == '' || !isset($_SESSION)) {
                
// session isn't started
                
session_start();
            }
            
$_SESSION['error_msg'] = _('Form verification code is invalid. Please enter form content again.');
            
header('Location: '.$_SERVER['HTTP_REFERER']);
            exit;
        }
    }