Php Codeigniter:如何在shortcode中使用的视图文件中加载控制器函数
请帮忙 鉴于此,我想调用控制器函数 因为我必须用简短的代码 内部控制器 鉴于Php Codeigniter:如何在shortcode中使用的视图文件中加载控制器函数,php,Php,请帮忙 鉴于此,我想调用控制器函数 因为我必须用简短的代码 内部控制器 鉴于 $(文档).ready(函数(){ var site_url=“”; $(“#季节”).load(站点url); }); 试试这个也许对你有帮助 谢谢你@ghugu public function __construct() { parent::__construct(); $this->Front = & get_instance(); } public function view
$(文档).ready(函数(){
var site_url=“”;
$(“#季节”).load(站点url);
});
试试这个也许对你有帮助
谢谢你@ghugu
public function __construct() {
parent::__construct();
$this->Front = & get_instance();
}
public function view() {
$this->index();
$this->load->view(view');
}
<?=$this->Front->view();?>
<script type="text/javascript">
$(document).ready(function () {
var site_url = "<?php echo base_url('/controller'); ?>";
$("#season").load(site_url);
});
</script>
<div id="season"> </div>