-
-
Save arunoda/f046ea26ba51c983ccae to your computer and use it in GitHub Desktop.
Codeigniter - Views
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>This is the header</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Hello extends CI_Controller { | |
public function index() { | |
// | |
echo "This is my index function"; | |
} | |
public function one($name) { | |
$this->load->view('header'); | |
$data = array("n" => $name); | |
$this->load->view('one', $data); | |
} | |
public function two() { | |
// | |
echo "This is the two"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>This is the One</h1> | |
Hello, <?php echo $n; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment