whi*_*sky 29 php codeigniter hmvc-codeigniter
HMVC:https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads
下载CI并通过HMVC复制后,我收到以下错误:
遇到了未被捕获的异常
类型:错误
消息:调用未定义的方法MY_Loader :: _ ci_object_to_array()
文件名:/Users/k1ut2/Sites/nine.dev/application/third_party/MX/Loader.php
行号:300
回溯:
文件:/Users/k1ut2/Sites/nine.dev/application/controllers/Welcome.php行:23功能:查看
文件:/Users/k1ut2/Sites/nine.dev/index.php行:315功能:require_once
Tim*_*law 97
只是在这里添加这个作为Clasyk提供的链接目前还没有...
该线程的简短版本归结为...
在application/third_party/MX/Loader.php中,您可以执行以下操作...
在public function view($view, $vars = array(), $return = FALSE)
寻找......(第300行)
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
Run Code Online (Sandbox Code Playgroud)
替换为
if (method_exists($this, '_ci_object_to_array'))
{
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
} else {
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));
}
Run Code Online (Sandbox Code Playgroud)
这是CI Devs实施的"小"无证变更的结果,这很好!
有关Wiredesignz的拉动请求等待行动,所以他知道它...
在此期间,您可以实现上面的"diddle"并重新编写代码:)
我找到了解决方案。这对我来说很有用。在application / third_party / MX / Loader.php的第300行
此行在CI 3.1.3中生成错误
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
Run Code Online (Sandbox Code Playgroud)
替换为此行。
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
29477 次 |
最近记录: |