Home >Backend Development >PHP Tutorial >snoopy模拟登录为何无法登录解决办法
snoopy模拟登录为何无法登录
自己写的要登录的系统
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>testlogin</title> <br><center>testlogin</center><br>
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php $loginId = $_POST['loginId'];$loginPass = $_POST['loginPass'];if($loginId == "aaa" && $loginPass == "123") echo "welcome!";else echo "<script language=javascript>alert('fail!');window.location='login.php'"; ?>
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> <title> New Document </title> <?phpinclude "Snoopy.class.php";$snoopy = new Snoopy;$submit_url = "http://127.0.0.1/testlogin/login.php"; $submit_vars["loginId"] = "aaa"; //可以登录的密码为aaa,123$submit_vars["loginPass"] = "123";//$submit_vars["loginSubmit"] = "登陆";$snoopy->submit($submit_url,$submit_vars);echo $snoopy->results;?>