Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASPÖ±½ÓÉú³ÉhtmlµÄ´úÂë


     ´Ë·½·¨¿ÉÒÔ²»ÐèҪרÃÅÖÆ×÷Ä£°åÎļþ£¬Ö»ÐèÕý³£ÔËÐеĶ¯Ì¬Ò³Ãæ¼´¿É£¬¾ßÌå·½·¨ÈçÏ£¬×îÖÕʹÓüû×îºóÒ»¸öº¯Êý£º
Function getHTTPPage(url) ‘Ê×Ò³Éú³É¿ªÊ¼
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
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 CreateStatic(txtURL,FileName)
sText = getHTTPPage(txtURL)
Set FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set openFile=FileObject.OpenTextfile(server.mapPath(Filename),2,true) ‘trueΪ²»´æÔÚ×ÔÐн¨Á¢
openFile.writeline(sText)
Set OpenFile=nothing
End Function

Function CreateIndex()
Response.Write("Ê×Ò³Éú³ÉÖУ¬ÇëÉÔºó...")
Response.Flush()
TxtUrl = "http://"&Request.ServerVariables("SERVER_NAME")&"/Default.asp"
FilePath = "/Default.html"
Call CreateStatic(TxtUrl,FilePath)
Response.Write(" ")
End Function


Ïà¹ØÎĵµ£º

ASPÖе÷Óôø²ÎÊýÊä³öµÄCOM½Ó¿Ú

 COM½Ó¿ÚVCʵÏÖ,½Ó¿Ú:
[id(1), helpstring("method Test")] HRESULT Test([in] BSTR strInputA, [in] BSTR strInputB, [out,retval] VARIANT* result);
ASPµ÷Óãº
Set   objCompInfo   =server.CreateObject("×é¼þÔÚϵͳÖеÄÃû×Ö")  
      ......

aspµ÷ÓÃsql server´æ´¢¹ý³Ì

ASPµ÷Óô洢¹ý³ÌµÄ·½·¨£º    
 
----  ¡¡¡¡µ÷Óô洢¹ý³ÌµÄ·½·¨ÐèҪʹÓÃADOµÄCommand¶ÔÏó¡£Command¶ÔÏóÊǶÔÒ»¸öÊý¾ÝÔ´ÔËÐÐÌØ¶¨ÃüÁîµÄ¶¨Ò壨ÀýÈ磬һ¸öSQL²éѯ»òÒ»¸öSQL´æ´¢¹ý³Ì£©¡£ÏÂÃæÒÔMS  SQL  SERVER6.5Ϊºǫ́Êý¾Ý¿â£¬½éÉÜASPµ÷Óô洢¹ý³ÌµÄ·½·¨¡£    
 
----  ¡ ......

asp³£ÓõÄÕýÔò±í´ïʽʵÏÖ×Ö·û´®µÄÌæ»»


asp³£ÓõÄÕýÔò±í´ïʽʵÏÖ×Ö·û´®µÄÌæ»»,Ö÷Òª°üÀ¨È¥³ýhtml±êÇ©£¬È¥³ýclass±êÇ©ºÍÈ¥³ýscript±êÇ©µÈ
È¥³ýhtml±êÇ©ÕýÔò<\/*[^<>]*>
Function LoseHtml(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "<\/*[^<>]*>"
......

ASPÓë´æ´¢¹ý³Ì


ASPÓë´æ´¢¹ý³Ì
ASPÓë´æ´¢¹ý³Ì(Stored Procedures)µÄÎÄÕ²»ÉÙ£¬µ«ÊÇÎÒ»³ÒÉ×÷ÕßÃÇÊÇ·ñÕæÕýʵ¼ù¹ý¡£ÎÒÔÚ³õѧʱ²éÔĹý´óÁ¿Ïà¹Ø×ÊÁÏ£¬·¢ÏÖÆäÖÐÌṩµÄºÜ¶à·½·¨Êµ¼Ê²Ù×÷ÆðÀ´²¢²»ÊÇÄÇô»ØÊ¡£¶ÔÓÚ¼òµ¥µÄÓ¦Óã¬ÕâЩ×ÊÁÏÒ²ÐíÊÇÓаïÖúµÄ£¬µ«½öÏÞÓÚ´Ë£¬ÒòΪËüÃǸù±¾¾ÍÊÇǧƪһÂÉ£¬»¥Ïà³­Ï®£¬ÉÔ΢¸´ÔÓµãµÄÓ¦Ó㬾ÍÈ«¶¼ÓïÑɲ»ÏêÁË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ