Codeigniter:如何在短代码中使用的视图文件中加载Controller函数[duplicate]

This question already has an answer here:

Please help in View I want to call controller function Beacuse I have to use this in short code

In controller

public function __construct() {
    parent::__construct();
    $this->Front = & get_instance();
}
public function view() {
    $this->index();
    $this->load->view(view');
}

In view

<?=$this->Front->view();?>
</div>
  <script type="text/javascript">
        $(document).ready(function () {
            var site_url = "<?php echo base_url('/controller'); ?>";
            $("#season").load(site_url);
        });
    </script>
<div id="season"> </div>

Try this might help you .