Create Custom Helper Controller
Program Info
Program Code
×

Create Custom Helper Controller

We are creating custom helper controller.

Footer

×

Create Custom Helper Controller

<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Custom_Helper_Controller extends CI_Controller
{

    public function index()
    {
        $array = array('name'=>'krishna','course'=>'B.Tech');
        $this->load->helper('text_helper');

        p($array);
        // echo "<pre>";
        // print_r($array);
        
    }



}




Footer

Create File Download Controller
Program Info
Program Code
×

Create File Download Controller

We creating file download controller.

Footer

×

Create File Download Controller

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class FileDownloadController extends CI_Controller{

    public function index()
	{
        $this->load->helper('download');
        $data = 'Here is some text!';
        $name = 'mytext.txt';
        force_download($name, $data);

       

	}

    
		
}




Footer

Create Home Controller
Program Info
Program Code
×

Create Home Controller

We creating home controller that load a view as home.

Footer

×

Create Home Controller

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class HomeController extends CI_Controller{

    public function index()
	{
		$this->load->view('home');
	}

    
		
}




Footer

Create Inserting Data Controller
Program Info
Program Code
×

Create Inserting Data Controller

We creating inserting data controller that inserting data of array into table.

Footer

×

Create Inserting Data Controller

<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Inserting_Data_Insert_Query_Controller extends CI_Controller
{

    public function index()
    {
        $data = array(
            'title' => 'My title',
            'name' => 'My Name',
            'date' => 'My date'
        );

        $this->db->insert('mytable', $data);
        // Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')

    }



}




Footer

Create Inserting Data with Object Controller
Program Info
Program Code
×

Create Inserting Data with Object Controller

We creating inserting data with object controller that inserting data of object into database table.

Footer

×

Create Inserting Data with Object Controller

<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Inserting_Data_Insert_Query_Using_Object_Controller extends CI_Controller
{

    public function index()
    {
        /*
        class Myclass {
              public $title = 'My Title';
              public $content = 'My Content';
              public $date = 'My Date';
         }
        */

        $object = new Myclass;
        $this->db->insert('mytable', $object);
        // Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date')

    }



}




Footer

Create IP Address Controller
Program Info
Program Code
×

Create IP Address Controller

We creating ip address controller.

Footer

×

Create IP Address Controller

<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Ip_Address_Method_Controller extends CI_Controller
{

    public function index()
    {
        echo $this->input->ip_address();
    }



}




Footer


×

Name : Krishna Verma    |    Father's Name : Mr. Satish Kumar    |    Email ID : krishnaverma28081997@gmail.com    |    Religion : Hindu    |    Address : Dayampur, kanker khera, Meerut Cantt (250001), UP    |    Date of Birth : 28 August 1997    |    Marital Status : Non-Married    |    Place of Birth : Dayampur Kanker Khera Meerut Cantt.    |    Gender : Male    |    Age : 28    |    Contact : 9520335394    |    Father's Occupation : Sports man    |    Mother's Name : Smt. Kuntesh Devi    |    Mother's Occupation : Homemaker    |    Number of Brothers : 1    |    Number of Sisters : 1    |    Current Residence : Dayampur kanker khera meerut cantt    |    Family Type : Nuclear Family    |    Family Name : verma    |    Height : 5' 6''    |    Weight : 70 kg    |    Complexion : Fair    |    Body Type : Athletic    |    Hair Color : Black    |    Health Status : Good    |    Any Physical Disability : No    |    Highest Qualification : B.Tech (CSE)    |    Master Skill : PHP Laravel    |    Total Projects : 40 +    |    Total Skills : 25 +    |    Languages Known : Hindi and English    |    Website : krishnaportfolio.in    |    Siblings : 3    |    Nationality : Indian    |    Total Experience : 5 Years    |    LinkedIn : https://www.linkedin.com/in/krishna-verma-840b71356/    |    Total Programs : 10000    |    Total Projects : 40    |    Total Skills : 25    |    Total Experience : 5    |    Total DSA Problems : 165    |    Total Served Companies : 2