<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title>php Tutorial Ajax return 404 Error </title>
<body>
<script language= "Web Effects" >
var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP");
Xmlhttp.open ("Post", "./upload.php", false);
Xmlhttp.setrequestheader ("Content-type", "multipart/form-data;");
Xmlhttp.setrequestheader ("Content-length", postlength);
Xmlhttp.send (package);
</script>
Code does not look wrong, return our output
alert (xmlhttp.status);
The return value is 404, looked up 404 is unable to find the file presented, in IIS is so dry, so the detailed check the principle is the path is wrong.
Xmlhttp.open ("Post", "./upload.php", false);
This file doesn't exist, ha.
</body>