snoopy類比登入有關問題

來源:互聯網
上載者:User
snoopy類比登入問題
PHP code
    New Document      fetchform("http://www.phpx.com/happy/logging.php?action=login");echo $snoopy->results."
"; */$submit_url = "http://www.phpx.com/happy/logging.php?action=login"; $submit_vars["cookietime"] = "2592000";$submit_vars["loginfield"] = "username";$submit_vars["username"] = "你的使用者名稱"; //你的使用者名稱$submit_vars["password"] = "你的密碼"; //你的密碼$submit_vars["questionid"] = "0";$submit_vars["answer"] = ""; $submit_vars["loginsubmit"] = "登入";//$submit_vars["loginsubmit"] = "dl"; //可以//$submit_vars["loginsubmit"] = ""; //不行//問題1:為什麼要加入上面那句:$submit_vars["loginsubmit"] = "登入",而且“登入”改為任何字眼都可以,但“”不可以$snoopy->submit($submit_url,$submit_vars);echo $snoopy->results;//問題2:登入成功後跳轉到http://127.0.0.1/snoopy/index.php?>




------解決方案--------------------
1.這個欄位是表單的一個隱藏欄位,如:.
2.這是由表單提交後的處理指令碼決定,照你說的情況,後面判斷是用的!empty($_POST[loginsubmit]),不是Snoopy的問題.
3.$snoopy->submit($submit_url,$submit_vars);
$snoopy->fetch('http://www.phpx.com/happy/index.php');//直接抓取最終頁面
echo $snoopy->results;
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.