请我有以下联系表格的功能,但它显示以下错误“致命错误:调用未定义的函数:stripos() in”我该如何解决它
function checkEmail($vEmail) {
$invalidChars ="/:,;" ;
if(strlen($vEmail)<1) return false; //Invalid Characters
$atPos = stripos($vEmail,"@",1); //First Position of @
if ($atPos != false) $periodPos = stripos($vEmail,".", $atPos); //If @ is not Found Null . position
for ($i=0; $i<strlen($invalidChars); $i++) { //Check for bad characters
$badChar = substr($invalidChars,i,1); //Pick 1
if(stripos($vEmail,$badChar,0) != false) //If Found
return false;
}
if ($atPos == false) //If @ is not found
return false;
if ($periodPos == "") //If . is Null
return false;
if (stripos($vEmail,"@@")!=false) //If @@ is found
return false;
if (stripos($vEmail,"@.") != false) //@.is found
return false;
if (stripos($vEmail,".@") != false) //.@ is found
return false;
return true;
}