Advertisement
freddy0512

controller

Aug 18th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. class Welcome extends CI_Controller {
  5.  
  6. public function index()
  7.     {  
  8.            $this->load->view('welcome_message',$data);
  9.     }
  10.  
  11. public function trend()
  12.     {
  13.         //for calling paginantion in function trendview
  14.         $this->trendview();
  15.     }
  16.  
  17. public function trendview($offset=0)   
  18.       {
  19.          $jml=  $this->db->get_where('articles',array('art_jenis'=>'TREND'));
  20.          $config['base_url'] = $this->config->item('base_url').'trend';  //tren is caming from router
  21.           //$config['base_url'] = base_url().'welcome/trendview'; <--when i change this it working by default url
  22.      }
  23. }
  24.  
  25.  
  26. //Router
  27. /*router for front end artikel*/
  28. $route['trend'] = 'welcome/trend';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement