主頁 > 知識庫 > 將首頁轉成靜態(tài)html頁的asp文件

將首頁轉成靜態(tài)html頁的asp文件

熱門標簽:阿里云 Mysql連接數(shù)設置 服務器配置 Linux服務器 團購網(wǎng)站 電子圍欄 科大訊飛語音識別系統(tǒng) 銀行業(yè)務
此程序只能將首頁轉成靜態(tài)!(真對一個頁面)

將createhtml.asp文件上傳到 你的空間存放首頁文件(index.asp)的目錄下
錄入網(wǎng)址直接打開createhtml.asp接提示操作就可以了
如果沒有轉成功可將createhtml.asp更名試一下(如:改成z.asp)錄入網(wǎng)址直接打開z.asp
本文件可以隨便改名不影響運行
復制代碼 代碼如下:

%
if request.QueryString("action")="ok"  then
dim kk,url,http,reurl
url =trim(request.Form("url"))
if url="" then
url="https://www.jb51.net"
end  if
kk=trim(request.Form("ad"))
if kk="" then
kk="index.html"
end  if
reurl=trim(request.Form("reurl"))
  set http=Server.createobject("Microsoft."chr(120)"MLHTTP") 
  Http.open "GET",url,false 
  Http.send() 
  set objStream = Server.CreateObject("ADODB.Stream") 
  objStream.type = 1 
  objStream.open 
  objstream.write http.responseBody
  objstream.saveToFile server.mappath(kk),2
  response.write "script language='javascript'>"
response.write "alert('發(fā)布成功');"
response.write "location.href='"reurl"';"
response.write "/script>"
else
%>
style type="text/css">
!--
.STYLE1 {
    font-size: 12px;
    color: #FF0000;
}
.STYLE2 {
    color: #0000FF;
    font-size: 12px;
}
-->
/style>

form id="form1" name="form1" method="post" action="http://%=request.ServerVariables("HTTP_HOST")request.ServerVariables("SCRIPT_NAME")%>?action=ok">
table>tr>td>
  span class="STYLE2">要轉靜態(tài)的網(wǎng)址:/span>/td>td>input name="url" type="text" id="url" value="https://www.jb51.net" /> 
  span class="STYLE1">例如https://www.jb51.net 本機的文件 http://localhost//span>/td>
   /tr>
   tr>td>span class="STYLE2">存放的路徑:/span>/td>td>
   input name="ad" type="text" id="ad"  value="index.htm"/> 
   span class="STYLE1">比如index.html 就是保存為和本文件同一目錄下的一個index.html/span>/td>
   /tr>
   tr>
    td>span class="STYLE2">轉靜態(tài)后需要跳轉到:/span>/td>
    td>
    input name="reurl" type="text" id="reurl" value="index.htm" /> 
    span class="STYLE1">轉靜態(tài)完成后會有提示框然后確定后就轉到您填寫的頁面/span>/td>
    /tr>
   tr>td>div align="right">   
    /div>/td>td>input type="submit" name="Submit" value="提交" />/td>
    /tr>/table>
/form>
%end if%>
span class="STYLE1">本文件可以隨便改名不影響運行/span>
您可能感興趣的文章:
  • 如何準確定時運行ASP文件
  • pjblog的ubbcodeasp文件
  • ASP文件中的安全問題
  • IIS 運行ASP文件500內(nèi)部錯誤解決方法大全
  • asp是什么格式 asp文件用什么打開
  • asp文件如何打開
  • asp文件用什么軟件編輯

標簽:萍鄉(xiāng) 衢州 衡水 大理 棗莊 蚌埠 廣元 江蘇

巨人網(wǎng)絡通訊聲明:本文標題《將首頁轉成靜態(tài)html頁的asp文件》,本文關鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266