由海譽_荷蘭豆于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;
}
}
同時解決限制輸入長度的問題
約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)