Welcome Guest, Not a member yet? Register   Sign In
Controller Example
#1

Its always good idea to use "BASEPATH" to see if file is been loaded directly. Also, comment "}" class/functoin endings. This is especially useful if you have maby lines of code. Use "EOF" (End-Of-File) with file path at the end of your file, to endicate that the file has ended.

Source Code:
Code:
<?php defined('BASEPATH') OR exit('Access Denied');

class Welcome extends CI_Controller {

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

} #class

#EOF: ./application/controllers/Welcome.php
Angel
Reply


Messages In This Thread
Controller Example - by Tux - 10-22-2014, 12:38 AM
RE: Controller Example - by Joostvanveen - 12-14-2014, 06:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB