I\'m using latest codeigniter and I need to create a flag (ideally in the config) when turned to \'true\', all pages display a \'maintenance mode\' message instead of execut
how about this :
auto-loaded libraries can contain something like this :
class Maintenance_mode {
function __construct(){
$CI =& get_instance();
$check_maintenance = $CI->db->select('flag_mode')->get('tbl_settings')->result();
if($check_maintenance[0]->flag_mode == '1')
redirect(site_url('maintenance_mode_controller'));
}
}
next step is to create a controller for maintenance page.