try { }catch(Exception $e){ } 输出错误信息

try { }catch(Exception $e){
  echo $e->getMessage(); //获取错误信息
  echo $e->getLine(); //获取发生错误的行
  echo $e->getFile();//获取发生错误的文件
  echo $e->getCode();//获取错误码
}
 

posted on 2020-07-01 16:40  沉淀物  阅读(715)  评论(0编辑  收藏  举报

导航