• <bdo id='jDjhK'></bdo><ul id='jDjhK'></ul>
    1. <legend id='jDjhK'><style id='jDjhK'><dir id='jDjhK'><q id='jDjhK'></q></dir></style></legend>
      <i id='jDjhK'><tr id='jDjhK'><dt id='jDjhK'><q id='jDjhK'><span id='jDjhK'><b id='jDjhK'><form id='jDjhK'><ins id='jDjhK'></ins><ul id='jDjhK'></ul><sub id='jDjhK'></sub></form><legend id='jDjhK'></legend><bdo id='jDjhK'><pre id='jDjhK'><center id='jDjhK'></center></pre></bdo></b><th id='jDjhK'></th></span></q></dt></tr></i><div id='jDjhK'><tfoot id='jDjhK'></tfoot><dl id='jDjhK'><fieldset id='jDjhK'></fieldset></dl></div>

      <small id='jDjhK'></small><noframes id='jDjhK'>

      1. <tfoot id='jDjhK'></tfoot>

        Codeigniter 扩展控制器,未找到控制器

        Codeigniter extending controller, controller not found(Codeigniter 扩展控制器,未找到控制器)
          <bdo id='8fECo'></bdo><ul id='8fECo'></ul>
                <tbody id='8fECo'></tbody>
            1. <i id='8fECo'><tr id='8fECo'><dt id='8fECo'><q id='8fECo'><span id='8fECo'><b id='8fECo'><form id='8fECo'><ins id='8fECo'></ins><ul id='8fECo'></ul><sub id='8fECo'></sub></form><legend id='8fECo'></legend><bdo id='8fECo'><pre id='8fECo'><center id='8fECo'></center></pre></bdo></b><th id='8fECo'></th></span></q></dt></tr></i><div id='8fECo'><tfoot id='8fECo'></tfoot><dl id='8fECo'><fieldset id='8fECo'></fieldset></dl></div>

              <small id='8fECo'></small><noframes id='8fECo'>

                <legend id='8fECo'><style id='8fECo'><dir id='8fECo'><q id='8fECo'></q></dir></style></legend>

                <tfoot id='8fECo'></tfoot>
                • 本文介绍了Codeigniter 扩展控制器,未找到控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 Codeigniter 2.1.2 中,我想创建基本控制器,然后从该控制器扩展.它不起作用,我不知道为什么,我现在非常绝望.

                  In Codeigniter 2.1.2 I want to create base controller and then extends from this controller. It does not work and I have no idea why and I'm pretty desperate now.

                  applicationcoreMY_Base_Controller.php 我有这个:

                  <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                  
                  class MY_Base_Controller extends CI_Controller 
                  {
                      function __construct()
                      {
                          parent::__construct();
                  ...
                  

                  applicationcontrollersHome.php 我有这个:

                  <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
                  
                  class Home extends MY_Base_Controller {
                  

                  错误信息是

                  致命错误:在第 3 行的 ...applicationcontrollersHome.php 中找不到MY_Base_Controller"类

                  我不知道该怎么做,我在互联网上读到我必须将基本控制器放入核心文件夹,我必须将基本控制器命名为前缀 MY_,我做到了.但它仍然没有工作.在我的 config.php 中也是这一行

                  I have no idea what to do, I read all over the internet that I have to put base controller to core folder what I did, that I have to name base controller with prefix MY_, I did. But it is still no working. And in my config.php is this line as well

                  $config['subclass_prefix'] = 'MY_';
                  

                  我使用 xampp 在本地主机上运行这个

                  Im running this on localhost using xampp

                  感谢您的帮助

                  编辑

                  有人可以下载以下链接试试看,然后告诉我出了什么问题.我刚刚下载了 codeigniter 试图创建基本控制器并扩展欢迎控制器.不工作.在下面的 rar 中只有修改过的文件.谢谢http://goo.gl/sKHkDl

                  Could someone please downlod following link try it, and tell me whats wrong. I have just downloaded codeigniter tried to create base controller and extend welcome controller. Not working. In following rar there are just modified files. Thank you http://goo.gl/sKHkDl

                  编辑 2

                  我可以通过将 MY_Base_Controller 重命名为 MY_Controller 来使其工作.这是否意味着,我只能为控制器创建一个扩展类?例如.我不能有

                  I'm able to get this working by renaming MY_Base_Controller to MY_Controller. Does this mean, I'm able to create only one extended class for a controller ? eg. I can not have

                  • MY_Base_Auth_Controller
                  • MY_Base_Article_Controller

                  只有MY_Controller?

                  推荐答案

                  我遇到了同样的问题,但如果我在 MY_Controller.php 文件中创建所有控制器都运行良好.

                  I had the same problem, but if I created all controllers in the MY_Controller.php file all worked well.

                  <?php
                  
                  class MY_Controller extends CI_Controller
                  {
                      function __construct()
                      {
                          parent::__construct();
                          // do some stuff
                      }
                  }
                  
                  class MY_Auth_Controller extends MY_Controller
                  {
                      function __construct()
                      {
                          parent::__construct();
                          // check if logged_in
                     }
                  }
                  

                  这篇关于Codeigniter 扩展控制器,未找到控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                  1. <legend id='nU7LS'><style id='nU7LS'><dir id='nU7LS'><q id='nU7LS'></q></dir></style></legend>

                    1. <small id='nU7LS'></small><noframes id='nU7LS'>

                      <tfoot id='nU7LS'></tfoot>

                      • <bdo id='nU7LS'></bdo><ul id='nU7LS'></ul>
                          <i id='nU7LS'><tr id='nU7LS'><dt id='nU7LS'><q id='nU7LS'><span id='nU7LS'><b id='nU7LS'><form id='nU7LS'><ins id='nU7LS'></ins><ul id='nU7LS'></ul><sub id='nU7LS'></sub></form><legend id='nU7LS'></legend><bdo id='nU7LS'><pre id='nU7LS'><center id='nU7LS'></center></pre></bdo></b><th id='nU7LS'></th></span></q></dt></tr></i><div id='nU7LS'><tfoot id='nU7LS'></tfoot><dl id='nU7LS'><fieldset id='nU7LS'></fieldset></dl></div>

                            <tbody id='nU7LS'></tbody>