HMVC 无法加载请求的文件

发布于 2025-01-05 03:36:17 字数 545 浏览 2 评论 0原文

您好,我有一些问题,我使用 Codeigniter 模块化扩展 - HMVC。

问题是当我尝试展示我的模块时。

遇到错误

无法加载请求的文件:quicklinks_show.php

我有两个模块

1.Dashboard 2.Quicklinks

当我尝试调用并显示仪表板模块中的另一个模块时,出现问题。 我将此代码放在 Dashboard/view/dashboard_view.php 模块中

<div id="modules">
   <?php modules::run('quicklinks/show');?>
</div> 

在我的 Quicklinks 模块中,我有简单的 Show() 函数

public function show(){
     $this->load->view('quicklinks_show');
} 

Hello i have some problem, i use Codeigniter Modular Extensions - HMVC.

Problem is when i try to show my module.

An Error Was Encountered

Unable to load the requested file: quicklinks_show.php

I have two modules

1.Dashboard
2.Quicklinks

The problem arises when I try to call and show another module in dashboard module.
I put this code in Dashboard/view/dashboard_view.php module

<div id="modules">
   <?php modules::run('quicklinks/show');?>
</div> 

In my Quicklinks modules i have simple Show() function

public function show(){
     $this->load->view('quicklinks_show');
} 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

愛上了 2025-01-12 03:36:17

确保视图文件夹命名正确,例如控制器*s*、模型*s* 和视图*s*

Make sure you have the view folder is named correct, so controller*s*, model*s* and view*s*

┊风居住的梦幻卍 2025-01-12 03:36:17

尝试这个拉取请求:

https://github.com/EllisLab/CodeIgniter/pull/1818

我对此进行了测试,看起来这是最好的 hmvc 解决方案。

此处下载:https://github.com/dchill42/CodeIgniter/tree/hmvc_unit

Try this pull request:

https://github.com/EllisLab/CodeIgniter/pull/1818

I tested that and it looks like this is the best hmvc solution.

Download here: https://github.com/dchill42/CodeIgniter/tree/hmvc_unit

流殇 2025-01-12 03:36:17

现在回复可能为时已晚,但您可能会在这篇HMVC 的深入文章中得到答案。

It may be too late to reply but you may get the answer in this in-depth article of HMVC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文