<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
function __construc()
{
parent::__construc();
/* Standard Libraries of codeigniter are required */
$this->load->database();
$this->load->helper('url');
$this->load->library('grocery_CRUD');
}
public function index()
{
echo "<h1>Welcome to the world of Codeigniter</h1>"; //Just an example to ensure that we get into the function
die();
}
public function employees()
{
$crud = new grocery_CRUD();
$crud -> set_table ('employees');
$output = $this->grocery_CRUD->render();
echo "<pre>";
print_r($output);
echo "</pre>";
die();
}
}
/* End on file Main.php */
/* Location: ./application/controllers/main.php */