乌克兰粉嫩XXX极品HD-国产色诱视频在线播放丝袜-久久国产精品77777-软萌小仙自慰喷白浆

建站知識(shí)

Welcome to Beijing RuiHeng TianLong Technology Co., Ltd.

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

時(shí)間:  來(lái)源:網(wǎng)站建設(shè)公司  作者:網(wǎng)站制作公司  點(diǎn)擊量:
網(wǎng)站建設(shè)中asp轉(zhuǎn)成html靜態(tài)頁(yè)方法,演示,需要注意什么?
asp網(wǎng)站建設(shè)的弊端是不能做太大型網(wǎng)站,我們指的是asp+access的形式,另外,asp網(wǎng)站有時(shí)候運(yùn)行起來(lái)會(huì)很慢,我們需要從源頭找方法解決,前段時(shí)間有個(gè)asp頁(yè)面執(zhí)行起來(lái)很慢,訪問(wèn)人數(shù)又頗多,而且又不經(jīng)常修改,又懶得直接做成靜態(tài)的,每次都要從服務(wù)器下載來(lái)改,只好想辦法把a(bǔ)sp頁(yè)面轉(zhuǎn)化成htm靜態(tài)頁(yè)面了,以增加承載的訪問(wèn)人數(shù)和較少資源的消耗。此代碼適合萬(wàn)網(wǎng)提供的獨(dú)立主機(jī)。  
  <% 
  Function GetPage(url) 
   '獲得文件內(nèi)容 
   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(要轉(zhuǎn)化的asp地址)和地址(要保存的html地址)設(shè)置好就可以了,一般這兩個(gè)文件在同一個(gè)目錄,才能保證圖片或者css、js起作用。
本文TAG標(biāo)簽: asp網(wǎng)站制作 asp網(wǎng)站建設(shè)
返回關(guān)閉本頁(yè)
上一篇:網(wǎng)站制作中css樣式em不管用,strong失效問(wèn)題,初始化不管用。    下一篇:asp網(wǎng)站制作中for循環(huán)語(yǔ)句怎么應(yīng)用,for循環(huán)實(shí)例。
推薦閱讀

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

在線咨詢
關(guān)閉
電話咨詢
網(wǎng)站制作電話
400-809-6709