问题
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