<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title></title> </head> <body> <form method="post"> <input type="text" name="email"> <input type="submit" value="提交email"> </form> </body> </html> <?php error_reporting(0); if(strpos($_POST['email'],'@')===false) { print "strpos的意思是:查找input:email中@第一次出现的位置."; } else { print "666"; } ?>