脚本如下:$serverName = "(local)";
$connectionInfo = array('UID' => 'sa', 'PWD' => '123', 'Database' => 'ccd'); 
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false ) {
     die( print_r( sqlsrv_errors(), true));
}
try{
$sendtoauth = new SimpleXMLElement($HTTP_RAW_POST_DATA);
$accname = $sendtoauth->{'account'};
$password = $sendtoauth->{'password'};
$accname = addslashes($accname);
$password = addslashes($password);
$authquery = "SELECT * FROM dbo.AuthTable WHERE WindyCode = '$accname' AND AuthID='".MD5ToUID($password)."'";
$authresult = sqlsrv_query($conn,$authquery);
if(sqlsrv_has_rows($authresult)){
$autharray = sqlsrv_fetch_array($authresult);
switch($autharray['event_inquiry']){
case 0:
header('Content-Type: text/xml; charset=utf-8');
print("<result>");
print("<userid>".strtolower($autharray['AuthID'])."</userid>");
print("<status>success</status>");
print("</result>");
break;
case 1:
header('Content-Type: text/xml; charset=utf-8');
print("<result>");
print("<userid>".strtolower($autharray['AuthID'])."</userid>");
print("<user-type>F</user-type>");
print("<status>success</status>");
print("</result>");
break;
break;
break;
}
}
else {
header('Content-Type: text/xml; charset=utf-8');
print("<status>failed</status>");
}
}
catch(Exception $e){
die("Nice try, faggot");
}

function MD5ToUID($str)
{
$resultstr=substr($str,0,8)."-".substr($str,8,4)."-".substr($str,12,4)."-".substr($str,16,4)."-".substr($str,20);
return $resultstr;
}
?>
系统win7 64位 IIS7+PHP5.3.15输入地址后总是报一下错误!!
Notice: Undefined variable: HTTP_RAW_POST_DATA in C:\inetpub\wwwroot\index.php on line 19
Nice try, faggot刚学PHP。。太菜了 特来求助!!