thinkphp 5 stdClass Call to undefined
生活随笔
收集整理的這篇文章主要介紹了
thinkphp 5 stdClass Call to undefined
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
$User = stdClass();
出現以下錯誤:
Call to undefined function Home\Controller\stdClass()
?
用 $User = new stdClass();?
就變成 Class 'Home\Controller\stdClass' not found
回復?ljf?: $User = new \stdClass();
注意PHP版本
回復?979137?: $User = new \stdClass();還真可以!這‘\’又是什么意思呢?求解?
回復?ljf?: '\' 表示根命名空間
?
來源:http://www.thinkphp.cn/topic/11223.html
總結
以上是生活随笔為你收集整理的thinkphp 5 stdClass Call to undefined的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LNMP 出现 No input fil
- 下一篇: 闭式冷却塔(说一说闭式冷却塔的简介)