English 中文(简体)
模板图书馆没有适当调整方向——密码编辑
原标题:Not properly redirected in template library - Codeigniter

我面临重方向的问题。 I m使用Williams模板图书馆。 除重新定向外,所有工程都找到。 用户在点击海 log后仍可访问该主页。 我的守则是:

页: 1

class Page extends CI_Controller {    
function index()
{
    $this->load->helper( form );
    $this->template->write_view( header , header );
    $this->template->write_view( content , login );
    $this->template->write_view( sidebar , sidebar );
    $this->template->render();
    }
}

家庭控制员:

class Home extends CI_Controller
{
    function __construct()
    {
        parent::__construct();
        $this->load->library( session );
        $this->load->model( user_model , check ,TRUE);
        if(!$this->check->checkUserLogin())
        {
            redirect( page );
        } 

    }

    function index()
    {
        $this->template->write_view( header , header );
        $this->template->write_view( content , home );
        $this->template->write_view( sidebar , sidebar );
        $this->template->render();
    }
}

我已经杀死了本届会议,但当用户点击背纽特时,仍然可以看到主页。 但是,如果用户更新网页,则该代码按预期运作。

帮助

问题回答

您可尝试在您的html头部使用以下两条守则:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

页: 1

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

基本上,这些事情都是一样的。 其中一个方面是,除非网站内容随着每一页的负荷发生变化,否则用户必须每时重载网页,而不是利用浏览器的剪辑机制所提供的速度。 你们必须就防止你所描述的背纽芬兰问题的重要性作出决定。 牢记,如果此人关闭了浏览器或浏览器,在纽伦之前就坐了很长时间,就会发现这个问题不存在。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签