因为tp,里面用到了抛出功能,不过关闭debug,那些抛错功能都被屏蔽了。
一旦抛错,直接跳到页面错误,不显示抛错内容。
像微信支付和其他的类库,我在引用后,因为程序有些异常得抛出,并看到内容,如何在debug关闭,还能看到抛出内容。
<code>throw new SDKRuntimeException("统一支付接口中,缺少必填参数openid!trade_type为JSAPI时,openid为必填参数!" . "<br>");
class SDKRuntimeException extends Exception {
public function errorMessage()
{
return $this->getMessage();
}
}
</code>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号