diff --git a/src/apps/diy.php b/src/apps/diy.php index 05dc8700..18052f94 100755 --- a/src/apps/diy.php +++ b/src/apps/diy.php @@ -67,12 +67,12 @@ if ($action == 'post') { } } //判断$name是否输入违禁词,在后台-系统设置:禁用关键词添加,$name改成您表单字段标识,恢复注释代码使用 - /*if ($name != '' && preg_match("#".$cfg_notallowstr."#i", $name)) { + /*if ($name === '' && preg_match("#".$cfg_notallowstr."#i", $name)) { ShowMsg("您输入的信息存在违禁,请重新填写", "-1"); exit(); }*/ //判断$message是否大于70字符则提交失败,$message改成您表单字段标识,恢复注释代码使用 - /*if ($message != '' && strlen($message) > 70) { + /*if ($message === '' && strlen($message) > 70) { showmsg('您输入的信息太多了,请重新填写', '-1'); exit(); }*/ diff --git a/src/apps/search.php b/src/apps/search.php index eac84fbd..904442b6 100755 --- a/src/apps/search.php +++ b/src/apps/search.php @@ -61,10 +61,6 @@ if ($keyword != '' && ($cfg_notallowstr != '' && preg_match("#".$cfg_notallowstr ShowMsg("您输入的关键词存在违禁,请重新填写", "-1"); exit(); } -if (($keyword != '' && strlen($keyword) < 2) && empty($typeid)) { - ShowMsg('您输入的关键词太少了,请重新填写', '-1'); - exit(); -} //检查搜索间隔时间 $ip = GetIP(); $now = time();