(服务器不支持!放弃吧!骚年!)

主要作用是为了分离数据库,灵感是这样的:收到json影响,把asp里的数据,用一个页面输出,然后用另外一个页面读取,这样就不用有数据库位置的烦恼了

代码 网上有很多,我贴上,作为记录

<%
Function GetBody(url)
on error resume next
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False, "", ""
.Send
GetBody = .ResponseBody
End With
Set Retrieval = Nothing
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

Function getHTTPPage(Path)
t = GetBody("http://localhost/"&Path)
getHTTPPage=BytesToBstr(t,"GB2312")
End function

content = getHTTPPage("userComm.asp?do=k")
response.Write(content)
%>

最新文章

  1. 《Redis入门指南(第二版)》读书思考总结之Redis五大数据类型
  2. VMware创建Linux虚拟机并安装CentOS(三)
  3. MySQL GROUP BY用法
  4. 框架 Onboard-引导页样式制作库
  5. Angular $scope和$rootScope事件机制之$emit、$broadcast和$on
  6. ubuntu软件推荐
  7. 给大一的学弟学妹们培训java web的后台开发讨论班计划
  8. Django基础,Day10 - template 模板引擎与路径设置
  9. 【网络编程】——linux socket demo
  10. yii 中引入js 和css 的方式
  11. 0c-41-ARC使用特点及注意事项
  12. OC文件操作(2)
  13. JS 昵称,手机号,邮箱判断
  14. 解析SS、SP、BP寄存器
  15. 1081. Rational Sum (20) -最大公约数
  16. TrueType字体的后缀名解释
  17. Codeforces Gym 101190M Mole Tunnels - 费用流
  18. Docker学习笔记-磁盘挂载运行.netcore
  19. k短路模板(洛谷P2483 [SDOI2010]魔法猪学院)(k短路,最短路,左偏树,priority_queue)
  20. kafka为什么这么优秀!

热门文章

  1. java中abstract和interface的區別(轉)
  2. 【Idea】Debug模式
  3. luogu 4720 【模板】扩展卢卡斯
  4. CodeForces 730G Car Repair Shop (暴力)
  5. HDU1430;魔板(BFS+康托展开)
  6. python产生时间
  7. Golang bash脚本自动创建一个go工程
  8. python之对堆栈、队列处理操作(转载+个人看法)
  9. ROS学习笔记十二:使用gazebo在ROS中仿真
  10. Saas物联网共享平台实战