易截截图软件、单文件、免安装、纯绿色、仅160KB

asp to html

<!--#include file="inc/conn.asp" -->
<%
openconn()
sql="select * from tbnews"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
id=rs("id")
%>
<%
do while not rs.eof
%>
<%
Do_Url = "http://"
'Do_Url = Do_Url&Request.ServerVariables("SERVER_NAME")&"/shownews.asp" 主目录
aa=Request.Servervariables("url") '虚拟目录
bb=InstrRev(aa,"/")
cc=left(aa,bb)
Do_Url = Do_Url&Request.ServerVariables("HTTP_HOST")&cc&"shownews.asp"
id=rs("id")
call SaveFile(""&id&".html",do_url&"?id="&id&"")
rs("n_path")=id&".html"
rs.update
%>
<%rs.movenext
loop
%>
<%
Response.Write("------共生成了"&rs.recordcount&"个文件------")
response.Write filepath
%>
<%
function SaveFile(LocalFileName,RemoteFileUrl)
Dim Ads, Retrieval, GetRemoteData
On Error Resume Next
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Adodb.Stream")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile Server.MapPath(LocalFileName), 2
.Cancel()
.Close()
End With
Set Ads=nothing
if err <> 0 then
SaveFile = false
err.clear
else
SaveFile = true
end if
End function
closeconn
%>


相关文档:

asp上传类2

 1.html代码  formname是表单name,editname是文件域name,uppath是上传文件保存路径.
<input name="qtxx" type="text" id="qtxx" size="50" />
 
<input type="button" name="Submit22" value="上传图片" onClick="window.open('upload.asp?formname=from1&editname=qtxx&uppath ......

ASP动态网页下UTF 8页面乱码的解决方法

为什么在ASP里指定了codepage为65001还经常显示乱码。才子在这里将这个问题详细解释一下,以免很多朋友再走弯路,甚至排斥UTF-8。 CHINAZ
  如果你还不知道UTF-8是什么东东,那才子建议你先去搜索一下UTF-8的相关资料吧。
  UTF-8编码之所以被越来越多的人接受甚至喜欢,肯定是有道理的,在WEB2.0盛行的今天,在大谈 ......

浅说asp的一些特点,呵呵

到底使用PHP,ASP,或其它哪种技术时,可能选择PHP 会很酷,但是如果你对Unix系统,以及Perl 或C 等知之甚少的话,这就不是一个明知的选择。ASP 可以用VBScript 进行编写,而VBScript 本身是MICROSOFT Visual Basic 产品的简化版本,它采用与Visual Basic 近似的语法框架,简单易学。考虑到Visual Basic 的普及性,那么你还 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号