asp 读取 另外一个带参数的asp文件(服务器不支持!放弃吧!骚年!)
(服务器不支持!放弃吧!骚年!)
主要作用是为了分离数据库,灵感是这样的:收到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)
%>
生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!
https://pengchenggang.gitee.io/navigator/
SMART原则:
目标必须是具体的(Specific)
目标必须是可以衡量的(Measurable)
目标必须是可以达到的(Attainable)
目标必须和其他目标具有相关性(Relevant)
目标必须具有明确的截止期限(Time-based)