此功能失败 -
function check_required_fields($required_array) {
$field_errors = array();
foreach($required_array as $fieldname) {
if ($fieldname == "date_expires_input") {
if ($fieldname == "Expiration Date (Y/M/D)" || $fieldname == "N/A" )
//print "here";
{
$field_errors[] = $fieldname;
}
} if (!isset($_POST[$fieldname]) || (empty($_POST[$fieldname]) && !is_numeric($_POST[$fieldname])))
{
$field_errors[] = $fieldname;
}
}
return $field_errors;
}
但是当我取消注释打印“这里”时,它起作用了!(虽然没有打印“这里”)。到底他妈发生了什么?!