注册 登录
TechRepubil.com.cn探客网
最具实践价值的IT应用分享平台
返回列表 回复 发帖

xmlhttp无法Get页面???高手支招..............

xmlhttp无法Get页面,为什么???后果严重,导致程序挂起,无法进行其他操作?
最好把你的代码贴出来。这样才能发现问题所在
Dim   strAction,objXmlHttp,objFSO,objFile,strPath,strLanmu   
      On   Error   Resume   Next   
      Set   objXmlHttp=Server.CreateObject("Microsoft.XMLHTTP")   
      objXmlHttp.Open   "GET","http://www.goofar.com",false   
   
      objXmlHttp.Send()   
      If   objXmlHttp.ReadyState<>4   or   objXmlHttp.Status<>200   Then   
          CreateHtml="生成"&strLanmu&"失败,请重试!"   &   err.number   &   "_"   &   err.description   &   "_"   &   err.source   
      Else   
            
   
  CreateHtml="成功生成"&strLanmu&"!"   
      End   If   
      Response.Write(bytes2BSTR(objXmlHttp.ResponseBody))   
      Set   objXmlHttp=Nothing   
  End   Function   
   
  Function   bytes2BSTR(vIn)   
      Dim   strReturn,i,ThisCharCode,NextCharCode   
      strReturn   =   ""     
      For   i   =   1   To   LenB(vIn)     
          ThisCharCode   =   AscB(MidB(vIn,i,1))     
          If   ThisCharCode   <   &H80   Then     
              strReturn   =   strReturn   &   Chr(ThisCharCode)     
          Else     
              NextCharCode   =   AscB(MidB(vIn,i+1,1))     
              strReturn   =   strReturn   &   Chr(CLng(ThisCharCode)   *   &H100   +   CInt(NextCharCode))     
              i   =   i   +   1     
          End   If     
      Next     
      bytes2BSTR   =   strReturn     
  End   Function
返回列表