国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

Call to a member function get() on null怎么解決?。?

zhuyujin001

問題描述

這里詳細(xì)描述問題
webman在config文件下的captcha.php里這樣寫

declare(strict_types=1);
use support\Container;
use think\facade\Cache;
return[
"option"=>Container::get(Cache::class),

];

然后就報(bào)錯(cuò)了,這怎么解決???

1635 2 0
2個(gè)回答

Gin

依賴注入沒裝吧?http://www.wtbis.cn/doc/webman/di.html

walkor 打賞

因?yàn)檩d入配置的時(shí)候Container還沒有初始化,所以是null。

  • zhuyujin001 2023-05-10

    謝謝,想問下:舊項(xiàng)目tp6里config下的captcha.php里用了return [ "option"=> app()->make(Cache::class) ] 我把舊項(xiàng)目改成webman的話,這塊怎么寫?。?/p>

  • walkor 2023-05-10

    直接new 試下

年代過于久遠(yuǎn),無法發(fā)表回答
??