【发布时间】:2017-04-11 08:35:30
【问题描述】:
在 PrestaShop 中,我可以使用 Tools::displayError() 函数显示错误,如下所示:
if (empty($email)) {
$this->errors[] = Tools::displayError('Email is empty.');
$this->doLog('ERROR: Email/username is empty');
} elseif (!Validate::isEmail($email)) {
$this->errors[] = Tools::displayError('Invalid email address.');
$this->doLog('ERROR: Invalid Email address');
}
在 OpenCart 中有类似的方法吗?有什么可以使用的功能吗?
谢谢
【问题讨论】:
标签: php function error-handling opencart