Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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]·ÀÖ¹ºóÍË£¬²âÊÔÓÐЧ

 <head runat="server">
    <title></title>
    <meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<script language="JavaScript"> ......

ASPº¯Êý´óÈ«

 ASPº¯ÊýÓëVBSCRIPTÀàËÆ£¬ÒÔϾÙһЩ³£Óõĺ¯Êý¡¡
¡¡
Array()¡¡
¡¡
º¯Êý·µ»ØÒ»¸öÊý×é¡¡
¡¡
±í´ïʽ Array(list)¡¡
¡¡
ÔÊÐíÊý¾ÝÀàÐÍ: ×Ö·û£¬Êý×Ö¾ù¿É¡¡
¡¡
ʵÀý£º <%¡¡
¡¡
Dim myArray()¡¡
¡¡
For i = 1 to 7¡¡
¡¡
Redim Preserve myArray(i)¡¡
¡¡
myArray(i) = WeekdayName(i)¡¡
¡¡
Next¡¡ ......

asp ¹ºÎï³µÀà

<%
'¹ºÎï³µÀà ÀàÃû£ºUserCart
'×÷Õß:gameing
'»ù±¾Ô­Àí:´ËÀàÓ÷þÎñÆ÷Session±äÁ¿±£´æÉÌÆ·Êý¾Ý,ÉÌÆ·ÓÃÒ»¸öÊý×é±íʾ.´ËÀàÀïÃæ±£´æÁËÈýÖÐÉÌÆ·¼Û¸ñ.
'1¡¢2008-11-25ÐÞ¸ÄFunction AddItem() by tommy ÉÌÆ·Ôö¼ÓÔÚ×îºó
'2¡¢2008-11-25ÐÞ¸Äby tommy Ôö¼Óɾ³ýÉÌÆ·¹ý³Ì Sub DelItem()
'3¡¢2008-11-25ת»»Ò»Ð©Êý¾ÝÀàÐͲÅÄÜÔ ......

ASP¶¯Ì¬ÍøÒ³ÏÂUTF 8Ò³ÃæÂÒÂëµÄ½â¾ö·½·¨

ΪʲôÔÚASPÀïÖ¸¶¨ÁËcodepageΪ65001»¹¾­³£ÏÔʾÂÒÂë¡£²Å×ÓÔÚÕâÀォÕâ¸öÎÊÌâÏêϸ½âÊÍһϣ¬ÒÔÃâºÜ¶àÅóÓÑÔÙ×ßÍä·£¬ÉõÖÁÅųâUTF-8¡£ CHINAZ
¡¡¡¡Èç¹ûÄ㻹²»ÖªµÀUTF-8ÊÇʲô¶«¶«£¬ÄDzÅ×Ó½¨ÒéÄãÏÈÈ¥ËÑË÷Ò»ÏÂUTF-8µÄÏà¹Ø×ÊÁϰɡ£
¡¡¡¡UTF-8±àÂëÖ®ËùÒÔ±»Ô½À´Ô½¶àµÄÈ˽ÓÊÜÉõÖÁϲ»¶£¬¿Ï¶¨ÊÇÓеÀÀíµÄ£¬ÔÚWEB2.0Ê¢ÐеĽñÌ죬ÔÚ´ó̸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ