业务咨询模块如何让英文也可以输入提交?

创建时间:2019-12-14 02:19发布者:招投标资质网点击数:1458
业务咨询模块如何让英文也可以输入提交?目前只能在留言时候输入中文才能提交,全英文或数字的不能,英文环境下很麻烦
回答 我也遇到这个问题(0)
海誉_荷兰豆2019-12-22 12:07回答
找到程序根目录中的文件,删除类似下方代码:

约64,65行
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} elseif (!check_consultation($_POST['contact'], 50)) {
$wrong['contact'] = preg_replace('/d%/Ums', $include_chinese, $_LANG['consultation_contact_wrong']);


约71,72行~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} elseif (!$check->is_telphone($_POST['telphone'])) {
$wrong['telphone'] = $_LANG['consultation_telphone'] . $_LANG['is_wrong'];


约78,79行
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} elseif (!check_consultation($_POST['brief'], 300)) {
$wrong['brief'] = preg_replace('/d%/Ums', $include_chinese, $_LANG['consultation_brief_wrong']);


约146,157行
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* +----------------------------------------------------------
* 检查是否包含中文字符且长度符合要求
* +----------------------------------------------------------
*/
function check_consultation($value, $length) {
$check_chinese = $GLOBALS['check']->if_include_chinese($value);

if ($check_chinese && $GLOBALS['check']->ch_length($value, $length)) {
return true;
}
}

同时解决限制输入长度的问题
有用(1) 没用(0)