How to call codeigniter controller function from view

后端 未结 14 1755
小蘑菇
小蘑菇 2020-11-27 05:53

How to call codeigniter controller function from view? When i call the function in a controller, get a 404 page.

14条回答
  •  情歌与酒
    2020-11-27 06:47

    Go to the top of your View code and do it like this :

      load->model('MyModelName');
         $MyFunctionReturnValue = $this->MyModelName->MyFunctionName($param));
    ?>
    
    
    Your HTML CODE

提交回复
热议问题