Friday 18 January 2019

php - Empty function not working in CodeIgniter





if(!empty($this->input->post())){
Var_dump($this->input-post());
}


this shows me Fatal Error




Fatal error: Can't use method return value in write context in D:\install\wamp\www\CI\application\controllers\user\user.php on line 39





I don't understand why this is happening.
In the CodeIgniter in controller file I have written this


Answer



change this



if(!empty($this->input->post())){
Var_dump($this->input-post());
}



to



if($this->input->post()){
var_dump($this->input-post());
}

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...