在Codeigniter中使用此HMVC插件。(https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/src/codeigniter-3.x/)
在另一个服务器上运行良好,但在这个服务器上我得到这个错误!
A PHP Error was encountered
Severity: 8192
Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: MX/Router.php
Line Number: 239
Backtrace:
File: /var/www/project.test/public/application/third_party/MX/Router.php
Line: 239
Function: strpos
File: /var/www/project.test/public/application/third_party/MX/Router.php
Line: 101
Function: _set_default_controller
File: /var/www/project.test/public/index.php
Line: 324
Function: require_once
5条答案
按热度按时间rt4zxlrg1#
我将函数set_class上的代码行更改为:
but5z9lq2#
只需更新Router.php中的函数文件路径:application\third_party\MX\Router.php
在此之后,它工作正常!
i34xakig3#
这个服务器运行的是PHP 7,请看一下这个pull请求:
https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/pull-requests/39/php73-fix-for-error-message-strpos-non/diff
qojgxg4l4#
将其更改为:
z0qdvdin5#
此链接不起作用。它显示“未找到存储库”。