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

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

zhuyujin001

問題描述

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

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

];

然后就報錯了,這怎么解決?。?br />

1715 2 0
2個回答

Gin

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

walkor 打賞

因為載入配置的時候Container還沒有初始化,所以是null。

  • zhuyujin001 2023-05-10

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

  • walkor 2023-05-10

    直接new 試下

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