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
%>
Ïà¹ØÎĵµ£º
×î½üºÜ¿àÄÕ£¬µ±Êý¾Ý·ÃÎÊʧ°Ü»òÕ߳ɹ¦µÄʱºò£¬ÒªÒ³ÃæµÄjs´¦ÀíһЩЧ¹û£¬Ö»ÊDz»ÖªµÀÔõôµ÷Ó㬷dz£ÓôÃÆ¡£ÖÕÓÚÕÒ
µ½ÁËÒ»¸öµØ·½£º
ScriptManager.RegisterStartupScript(ListUpdatePanel, typeof(UpdatePanel), "", "alert(1);", true);
ÔÚºǫ́µÄº¯ÊýÖе÷ÓÃÕâ¸ö¼´¿É¡££¨Õë¶Ôupdatepanel£©Ë¢ÐÂÊý¾Ýºó£¬¾Í»áµ÷ÓÃjs ......
1.·Å×¢È뺯Êý
sub aspsql()
SQL_injdata = "'|;|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.Form(Sql_Post) ......
<%
'¹ºÎï³µÀà ÀàÃû£ºUserCart
'×÷Õß:gameing
'»ù±¾ÔÀí:´ËÀàÓ÷þÎñÆ÷Session±äÁ¿±£´æÉÌÆ·Êý¾Ý,ÉÌÆ·ÓÃÒ»¸öÊý×é±íʾ.´ËÀàÀïÃæ±£´æÁËÈýÖÐÉÌÆ·¼Û¸ñ.
'1¡¢2008-11-25ÐÞ¸ÄFunction AddItem() by tommy ÉÌÆ·Ôö¼ÓÔÚ×îºó
'2¡¢2008-11-25ÐÞ¸Äby tommy Ôö¼Óɾ³ýÉÌÆ·¹ý³Ì Sub DelItem()
'3¡¢2008-11-25ת»»Ò»Ð©Êý¾ÝÀàÐͲÅÄÜÔ ......
ΪʲôÔÚASPÀïÖ¸¶¨ÁËcodepageΪ65001»¹¾³£ÏÔʾÂÒÂë¡£²Å×ÓÔÚÕâÀォÕâ¸öÎÊÌâÏêϸ½âÊÍһϣ¬ÒÔÃâºÜ¶àÅóÓÑÔÙ×ßÍä·£¬ÉõÖÁÅųâUTF-8¡£ CHINAZ
¡¡¡¡Èç¹ûÄ㻹²»ÖªµÀUTF-8ÊÇʲô¶«¶«£¬ÄDzÅ×Ó½¨ÒéÄãÏÈÈ¥ËÑË÷Ò»ÏÂUTF-8µÄÏà¹Ø×ÊÁϰɡ£
¡¡¡¡UTF-8±àÂëÖ®ËùÒÔ±»Ô½À´Ô½¶àµÄÈ˽ÓÊÜÉõÖÁϲ»¶£¬¿Ï¶¨ÊÇÓеÀÀíµÄ£¬ÔÚWEB2.0Ê¢ÐеĽñÌ죬ÔÚ´ó̸ ......