I am utterly and completely confused. I’ve looked through all the documentation and I can’t find a solution. Setup: CI 2.1.3, QNAP server.
Problem: I cannot use a private function on a controller:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Signup extends CI_Controller {
public function index()
{
_loadcontent();
}
private function _loadcontent()
{
$this->load->view('welcome_message');
}
}
/* End of file signup.php */
/* Location: ./application/controllers/account/signup.php */
it won’t work and gives an HTTP Error 500 (Internal Server Error). HOWEVER, placing the file in the main controller directory works. Does anybody have any clue? is this a bug? Thanks in advance.
You need to call the function using
$this.