标题:ASP能不能转换成HTML
只看楼主
孤星泪水
Rank: 1
等 级:新手上路
帖 子:89
专家分:0
注 册:2007-4-18
 问题点数:0 回复次数:6 
ASP能不能转换成HTML
我是想问问大家
ASP能不能生成HTML
搜索更多相关主题的帖子: ASP HTML 
2007-04-18 22:37
阳光白雪
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:39
帖 子:2220
专家分:0
注 册:2005-11-18
得分:0 
能,

专注于WEB前端交互平台开发:[url=http://blog./]blog.[/url](富客户端技术(RIA)交流平台)
2007-04-19 08:36
lq7350684
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:5089
专家分:98
注 册:2006-11-6
得分:0 
呵呵,回答的好经典啊.
2007-04-19 09:40
孤星泪水
Rank: 1
等 级:新手上路
帖 子:89
专家分:0
注 册:2007-4-18
得分:0 
那怎么转换呢

2007-04-19 11:06
d778
Rank: 1
等 级:新手上路
帖 子:257
专家分:0
注 册:2006-1-10
得分:0 
能啊

2007-04-19 11:23
d778
Rank: 1
等 级:新手上路
帖 子:257
专家分:0
注 册:2006-1-10
得分:0 

参考代码! 可以实现 生成ASP!!!!
<%
Server.ScriptTimeout=99999999
'on error resume next

Function GetPage(url)
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False, "", ""
.Send
GetPage = BytesToBstr(.ResponseBody)
End With
Set Retrieval = Nothing
End Function

Function BytesToBstr(body)
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 = "GB2312"
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function

SiteURLa=SiteURL&"你要生成的页面"

a = GetPage(SiteURLa)

if err.number<>0 then
response.write "错误页 你自己琢磨吧 都写出来累!"
response.end
end if

Set fso = Server.CreateObject("Scripting.FileSystemObject")
path="union/wenzi1000.htm"
Set fout = fso.CreateTextFile(server.mappath(path))
fout.WriteLine a
fout.close
set fso=nothing
response.flush
response.write SiteURLa&"<br>"
response.write "生成成功!</br>"
%>


2007-04-19 11:27
孤星泪水
Rank: 1
等 级:新手上路
帖 子:89
专家分:0
注 册:2007-4-18
得分:0 
哈哈!

2007-04-19 11:28



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-133004-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020155 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved