非靜態方法getpathinfo無法靜態調用
在左側欄鏈接的狀態顯示中
使用Request::getPathInfo()=="url"?"active":“”
會提示Non-static method cant called statically
這要如何處理?
查詢過百度,通過應用(new \Illuminate\Http\Request())->getPathInfo()
不會報錯,但卻無效果
在左側欄鏈接的狀態顯示中
使用Request::getPathInfo()=="url"?"active":“”
會提示Non-static method cant called statically
這要如何處理?
查詢過百度,通過應用(new \Illuminate\Http\Request())->getPathInfo()
不會報錯,但卻無效果
2017-09-17
舉報
2018-10-21
2017-10-27
request()->getPathInfo() 用這個代替試試看