bir kontrolör başka bir denetleyiciye kullanıcıyı gönderebilirsiniz

0 Cevap php

Ben CodeIgniter için gerçekten yeni duyuyorum.

Ben kurulum için kullanıcı sayfaları görüntülemek için giriş yapmalısınız bir web sitesi çalışıyorum. Java geliyor, ben şeyler hiyerarşik yaklaşım alıyorum.

Benim düşünce benim kendi Kontrolörü üssü yazmak oldu:

<?php
class MY_Controller extends Controller
{
function  Controller()
{
    parent::Controller();

    if(!$this->quickauth->logged_in())
    {
    //they need to login, send them to the login page.
    }
}
}
?>

Şimdi ben bunu uzatmak denetleyicileri yazabilirsiniz ve ben her zaman oturum olacak emin olacak

İşte giriş sayfası için anahat:

<?php
class login extends Controller
{
function index()
{
        //Lets just double check, they might not have to login.
    if ($this->quickauth->logged_in())
    {
    //send them to the main controller
    }
}
}
?>

Well as you can see I have gotten this far. What do I need to replace:
1. //send them to the main controller
2. //they need to login, send them to the login page.

ile?

Bunu yapmanın iyi bir yolu var mı?

Thanks, Blake

0 Cevap