asp生成静态本地正常,传到服务器运行就数据库卡死

weifwu127 2021-04-18 04:45:42
Function getHTTPPage(url)
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "post",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
End function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
...全文
363 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
hookee 2021-04-25
  • 打赏
  • 举报
回复
服务器端用 Set http = CreateObject("MSXML2.ServerXMLHTTP")
另外可以用vbs脚本执行,不需要用asp
Rimifon 2021-04-19
  • 打赏
  • 举报
回复
这里的代码可以改成异步等待。然后,问题有可能是调用的时候 url 没有传对。
weifwu127 2021-04-19
  • 打赏
  • 举报
回复
异步等待应该怎么弄? 弄否帮忙指点一下 谢谢了

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧