本文介绍了如何包括CodeIgniter生成的页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

包含CI档案的最简单方法是什么?
假设我想要包含 on example.com

What would be the easiest way to include a CI file?Let's say I want to include http://example.com/ci/index.php/mycontroller/ on example.com

example.com不运行CI,我不能做include('ci / index.php / mycontroller')。

example.com doesn't run CI and I can't do include('ci/index.php/mycontroller').

推荐答案

由于我似乎无法调用CI控制器的函数,所以我决定最简单的加载带有jQuery的页面:

As I couldn't seem to invoke the CI controller's functions, I decided it's easiest to simply load the page with jQuery:

$('#myDiv').load('ci/index.php/mycontroller', {}, function(){
        $('#myDiv #loading').hide();
        $('#myDiv #data').slideDown(500);
});

这篇关于如何包括CodeIgniter生成的页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 08:33