Message: call_user_func_array() expects parameter 1 to be a valid callback

爷,独闯天下 提交于 2020-04-11 04:37:11

问题


A PHP Error was encountered Severity: Warning

Message: call_user_func_array() expects parameter 1 to be a valid callback, class 'Error' does not have a method 'index'

Filename: core/CodeIgniter.php

Line Number: 532

Backtrace:

File: /var/www/monitors/index.php Line: 315 Function: require_once

In my local system working fine but i move to the server i got this error


回答1:


I got a similar error that I solved by renaming the Error class to Errors in application/controllers/Errors.php. In config/routes.php I changed the class name accordingly:

$route['404_override'] = "errors/page_missing";


来源:https://stackoverflow.com/questions/49533334/message-call-user-func-array-expects-parameter-1-to-be-a-valid-callback

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!