Saturday, 30 July 2016

php - Codeigniter error: Parse error: syntax error, unexpected


Parse error: syntax error, unexpected '(', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\xampp\htdocs\code\application\controllers\user.php on line 14





class User extends CI_Controller

{

public function __construct()
{
parent:: __construct();
$this->load->model('user_model');
}

public function get()
{

$this->user_model->(2);
}

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...