【发布时间】:2014-09-18 07:06:16
【问题描述】:
我在 textarea 中进行 reg 表达式检查时出现此警告。
警告:ereg(): REG_BADBR in contact/library.php
我的代码是
function validateMessage($message) {
if(ereg('^[A-Za-z0-9[:punct:]]{2,300}$',$message)){
return true;
}
else {
return false;
}
}
收到错误是因为我有错误的 ereg 还是因为它在 textarea 中?!
【问题讨论】:
-
最好提供cmets,而不是只提供代码。