解決辦法有4個:
1:在上面初始化
2:打開php.ini文件
修改配置文件
error_reporting設置:
找到error_reporting=E_ALL
修改為error_reporting=E_ALL & ~E_NOTICE
3:用include把 error_reporting(E_ALL & ~E_NOTICE);寫進去
4:直接在文件最上面加個error_reporting(0);