Wednesday, 29 October 2014

CodeIgniter:: Source code log out daripada sistem


  • Source code log out berfungsi ketika anda ingin keluar daripada sistem di mana ianya akan menghapuskan kesemua session data
       Controller
       
       Controller code yang boleh diakses daripada URL
       index.php/twitter/logout/.

       function logout()
       {
             session_destroy();
             $this->load->view('twitter/logout');
       }


      View

      View fail untuk page ini sangat simple. Cipta satu fail baru di dalam folder
      view Twitter yang dipanggil logout.php

      <!DOCTYPE HTML>
     <html>
     <head>
     <title>Twitter oAuth - Logged Out</title>
     </head>
     <body>

     <p>You are no longer logged in!</p>
      </body>
      </html>






Posted by:
SAIPUL BAHARI BIN HASAN
Source:
Internet

 

0 comments:

Post a Comment