首页 > 解决方案 > Codeigniter- call_user_func_array() 期望参数 1 是一个有效的回调,类 'Error' 没有方法 'index'

问题描述

我在本地主机上的 CodeIgniter 上开发了一个交付服务应用程序,它运行时没有任何错误(使用 MAMP Pro)。

现在我决定将它上传到我在 Dreamhost 的域中,我已经配置它,成功登录,但是当我点击客户或员工时,它给出了以下错误;

遇到 PHP 错误

严重性:警告

消息:call_user_func_array() 期望参数 1 是有效的回调,类 'Error' 没有方法 'index'

文件名:core/CodeIgniter.php

行号:532

回溯:

文件:/home/dh_yg2qtz/aquamanager/index.php 行:315 功能:require_once

我的客户型号代码是:

class customer extends BaseController {
var $ascustr = 'ASCU-';

     public function __construct()
        {
             parent::__construct();
             //$this->load->helper('form');
$this->load->library('form_validation');
                 $this->load->model('user_model');
        $this->isLoggedIn();  
            $this->load->helper('url');
            $this->load->model('customer_model','customer');
        }

    public function index()
    {
    $this->global['pageTitle'] = 'CodeInsect : Customer Managemwnt';
        $customers=$this->customer->get_all_customers(); 
        //$products=$this->customer->get_all_products();
        $deliverydays=$this->customer->get_all_deliverydays();
        $employees=$this->customer->get_all_employees();
        $referenceperson=$this->customer->get_all_references();

        $data ['customers'] = $customers;
        $data ['deliverydays'] = $deliverydays;
        $data ['employees'] = $employees;
        $data ['referenceperson'] = $referenceperson;
        $this->loadCustomers("/customers/customer_view", $this->global, $data, NULL);
        //$this->loadViews("customers/customer_view", $this->global,  $data);
        
    }

请帮我解决问题,我将非常感谢你。

标签: phpcodeigniter

解决方案


推荐阅读