<button id="c4w0s"><xmp id="c4w0s">
<s id="c4w0s"><small id="c4w0s"></small></s>
<wbr id="c4w0s"></wbr>
<button id="c4w0s"><strong id="c4w0s"></strong></button><div id="c4w0s"><s id="c4w0s"></s></div> <wbr id="c4w0s"><small id="c4w0s"></small></wbr><button id="c4w0s"><small id="c4w0s"></small></button><wbr id="c4w0s"><strong id="c4w0s"></strong></wbr>
<wbr id="c4w0s"><label id="c4w0s"></label></wbr>
<wbr id="c4w0s"><strong id="c4w0s"></strong></wbr>

建站知識

Welcome to Beijing RuiHeng TianLong Technology Co., Ltd.

網(wǎng)站建設中asp轉成html靜態(tài)頁(yè)方法,演示,需要注意什么?

時(shí)間:  來(lái)源:網(wǎng)站建設公司  作者:網(wǎng)站制作公司  點(diǎn)擊量:
網(wǎng)站建設中asp轉成html靜態(tài)頁(yè)方法,演示,需要注意什么?
asp網(wǎng)站建設的弊端是不能做太大型網(wǎng)站,我們指的是asp+access的形式,另外,asp網(wǎng)站有時(shí)候運行起來(lái)會(huì )很慢,我們需要從源頭找方法解決,前段時(shí)間有個(gè)asp頁(yè)面執行起來(lái)很慢,訪(fǎng)問(wèn)人數又頗多,而且又不經(jīng)常修改,又懶得直接做成靜態(tài)的,每次都要從服務(wù)器下載來(lái)改,只好想辦法把asp頁(yè)面轉化成htm靜態(tài)頁(yè)面了,以增加承載的訪(fǎng)問(wèn)人數和較少資源的消耗。此代碼適合萬(wàn)網(wǎng)提供的獨立主機。  
  <% 
  Function GetPage(url) 
   '獲得文件內容 
   dim Retrieval 
   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 
   
  on error resume next 
  Url="http://www.sina.com.cn" 要讀取的頁(yè)面地址 
  response.write "開(kāi)始更新首頁(yè)..." 
  wstr = GetPage(Url) 
   
  'response.write(wstr) 
  Set fs=Server.CreateObject("Scripting.FileSystemObject") 
   
  'if not MyFile.FolderExists(server.MapPath("/html/")) then 
  'MyFile.CreateFolder(server.MapPath("/html/"))' 
  'end if 
   
  '要存放的頁(yè)面地址 
  dizhi=server.MapPath("index.htm") 
  If (fs.FileExists(dizhi)) Then 
  fs.DeleteFile(dizhi) 
  End If 
   
  Set CrFi=fs.CreateTextFile(dizhi) 
  Crfi.Writeline(wstr) 
  set CrFi=nothing 
  set fs=nothing 
  response.write "...<font color=red>更新完成!</font>" 
  %>      
  代碼算是最簡(jiǎn)單的,直接保存成一個(gè)asp文件即可,只要把URL(要轉化的asp地址)和地址(要保存的html地址)設置好就可以了,一般這兩個(gè)文件在同一個(gè)目錄,才能保證圖片或者css、js起作用。
本文TAG標簽: asp網(wǎng)站制作 asp網(wǎng)站建設
返回關(guān)閉本頁(yè)
上一篇:網(wǎng)站制作中css樣式em不管用,strong失效問(wèn)題,初始化不管用。    下一篇:asp網(wǎng)站制作中for循環(huán)語(yǔ)句怎么應用,for循環(huán)實(shí)例。
推薦閱讀

Copyright © 2010-2021 北京瑞恒天龍科技有限公司  All Rights Reserved  |  北京網(wǎng)站建設知名服務(wù)商  |  北京網(wǎng)站制作 | 京ICP備11004170號-1   京公網(wǎng)安備110107000463號
地址:北京市海淀區永定路長(cháng)銀大廈B座  非工作時(shí)間:15810379666  服務(wù)熱線(xiàn):400-809-6709  版權所有 盜版必究!

在線(xiàn)咨詢(xún)
關(guān)閉
電話(huà)咨詢(xún)
網(wǎng)站制作電話(huà)
400-809-6709
JiZzJiZZ国产免费A_玖玖玖色在线精品视频_欧美韩国人成网站中文字幕_精品2022露脸国产偷人
<button id="c4w0s"><xmp id="c4w0s">
<s id="c4w0s"><small id="c4w0s"></small></s>
<wbr id="c4w0s"></wbr>
<button id="c4w0s"><strong id="c4w0s"></strong></button><div id="c4w0s"><s id="c4w0s"></s></div> <wbr id="c4w0s"><small id="c4w0s"></small></wbr><button id="c4w0s"><small id="c4w0s"></small></button><wbr id="c4w0s"><strong id="c4w0s"></strong></wbr>
<wbr id="c4w0s"><label id="c4w0s"></label></wbr>
<wbr id="c4w0s"><strong id="c4w0s"></strong></wbr>