【发布时间】:2011-07-29 04:21:58
【问题描述】:
我正在使用以下静态方法发送邮件警报,但它会引发错误:warning:division by zero ...
Postman::MailAlert($_POST['email'],'Hello '.$_POST['name'].', Thanks for signing up.Your customer id is '.$_POST['city']/'/'.$product_id.'.');
我已经通过输入@解决了这个问题,但是为什么会提出这个问题,我做错了什么?
【问题讨论】:
-
PHP.net :
Currently the "@" error-control operator prefix will even disable error reporting for critical errors that will terminate script execution. Among other things, this means that if you use "@" to suppress errors from a certain function and either it isn't available or has been mistyped, the script will die right there with no indication as to why.所以它不能解决问题,它会忽略这个问题。 -
@Wh1T3h4Ck5 感谢您的建议。
标签: php