ThinkCMF5.0.18報Object of class think\Request could not be converted to string錯誤解決辦法

作者:星辰網絡工作室 日期:2019-09-26 瀏覽:4477

QQ截圖20190926170112.jpg

[4096]?ErrorException?in?Loader.php line 526

Object of class think\Request could not be converted to string

??public?static?function?parseName($name,?$type?=?0,?$ucfirst?=?true)
????{
????????if?($type)?{
????????????$name?=?preg_replace_callback('/_([a-zA-Z])/',?function?($match)?{
????????????????return?strtoupper($match[1]);
????????????},?$name);
????????????return?$ucfirst???ucfirst($name)?:?lcfirst($name);
????????}

????????return?strtolower(trim(preg_replace("/[A-Z]/",?"_\\0",?$name),?"_"));
????}

  找到/home/wwwroot/default/test/simplewind/thinkphp/library/think/view/driver/Think.php line 132

  把$template = str_replace('.', DS, $controller) . $depr . (1 == $this->config['auto_rule'] ? Loader::parseName($request->action(true)) : $request->action());

  修改成$template = str_replace('.', DS, $controller) . $depr . $request->action();

這樣就能不報錯了

THINKCMF_VERSION

5.0.180901

THINK_VERSION

5.0.20


九九精品无码专区免费,亚洲国产日产欧美综合,无码专区6080yy电影,午夜一级特黄A片在线观看