| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> asp >> shi yong Server.Transfer qing song yong ASP shi xian Rewrite mo ni sheng cheng jing tai ye xiao guo

shi yong Server.Transfer qing song yong ASP shi xian Rewrite mo ni sheng cheng jing tai ye xiao guo

2008-11-29 07:43:01 编辑來源:互联网 评论
 
 
 
本文为【实用Server.Transfer轻松用ASP实现Rewrite模拟生成静态页效果】的拼音翻译版
  yi qian gang gang dong 404.asp de shi hou , zeng jing huan xiang ba suo you cheng xu dai ma xie dao 404.asp zhong , shi xian yi ge mo ni sheng cheng jing tai wang ye de zhan , ru guo cheng xu xiao huan ke yi , yong 404.asp shi xian Rewrite huan shi yi ge bu cuo de xuan ze , ru guo cheng xu dai ma duo da 100000 xing , kong pa jiu yao kai shi pa le
  zhi dao kan dao asp de Server.Transfer, yong 404 mo ni sheng cheng jing tai ye de zhan de nian tou chong xin zai wo de nao hai zhong fu xian chu lai , xian zai ji shi zai da de cheng xu , ye ke yi yong ASP zhong de Server.Transfer qing song gao ding
  <!--#include file="bin/404_Query"-->
  < %
  select case bin_command
   case "bin"
   server.transfer("bin/web")
   case "uploadfiles"
   server.transfer("bin/send-stream")
   case else
   server.transfer("bin/send-404")
  end select
  %>
  he he , shuo bai le , jiu shi gen ju bin_command lai pan duan dao di yao shi xian hen me gong neng , ru guo wei bin ze you asp de Server.Transfer yi jiao dao dao bin/web, ran hou fan hui jie guo , bing qie neng hen hao de jie jue URL di zhi de you hao xing de wen ti , shi xian mo shi sheng cheng jing tai ye de xiao guo 。 zai PHP zhong mei you Rewrite, ru guo xiang yao URL you hao xing tong chang shi yong PATH_INFO, er ben cheng xu you asp de Server.Transfer mo ni le PHP zhong de Path_Info, wei yi xu yao de jiu shi yao zhi chi 404.asp
  bin/404_Query de yuan dai ma ru xia :
  < %
  Urls=mid(request.querystring,instr(request.querystring,":80")+4)
  if instr(Urls,"/")>0 then
   bin_command=left(Urls,instr(Urls,"/")-1)
   getfile=replace(Urls,bin_command&"/","")
  else
   bin_command="bin"
  end if
  %>
  zhe duan dai ma zhu yao shi pan duan bin_command you shen me lai zhi xing , shou xian kan shi fou bao han er ji mu lu , ru guo mei er ji mu lu , ze fu zhi ”bin”( dai biao cheng xu )
  ru :demo.com/index5.html, ze bin_command=”bin”, tong guo shang bian de dai ma ke yi zhi dao jiao gei bin/web chu li
  demo.com/uploadfiles/123456.gif( gai wen jian shi ji dui ying de shi files/123456.gif), ze bin_command=”uploadfiles”, tong guo shang bian de dai ma ke yi zhi dao jiao gei bin/send-stream chu li ,send-stream zen me shu chu files/123456.gif ne 。 ke yi shen kao wo yi qian xie de yi pian wen zhang ASP shi yong BinaryWrite yu Adodb.Stream shi xian xia zai (http://miaoqiyuan.cn/p/asp-binarywrite-adodb-stream/
  demo.com/111/222, ze bin_command=”111″, zai select case zhong mei you ding yi , ze shi else, jiao gei bin/send-404 chu li , shu chu mei you zhao dao wen jian de xin xi
  zhe yang zai suo you fang ke ( bao kuo : bai du ,Google) kan lai , ben zhan dou shi yi ge sheng cheng jing tai de ye mian le 。 ju wo suo zhi guo nei IIS zhu ji you 99.9% bu zhi chi Isapi_Rewrite, jiu yu guo yi ci , yin wei zhan zi yuan tai yan chong hen kuai jiu gei qu xiao le 。
  xia mian shi wo zai ASP xue xi wang shang kan dao de , fu zai hou mian , yi gong shen kao :
  tiao yong Server.Transfer fang fa , li ji zhong zhi zhi xing di yi ye bing qie kai shi zhi xing di er ye 。
  ru guo di yi ye kai shi xie ru xiang ying huan chong qu , di er ye zhui jia nei rong dao huan chong qu er bu shi ti huan ta 。
  ru guo huan chong shi da kai , gai fang fa jiang xiu gai HTTP tou , chu fei shang mei you nei rong yi bei fa song . ru guo ASP huan chong guan bi , HTTP tou jiang bu xiu gai .
  dang chuan shu dao qi ta ying yong cheng xu , qi shi ye Application he Session dui xiang jiang bao han ying yong cheng xu xin xi zhong 。
  shi li
  xia lie shi li ye chan shi ru he shi yong Server.Transfer fang fa 。
  1.
  <html>
  <body>
  <h3>Step 1 - Form Page</h3>
  <table border="1">
  <tr>
  <th>POST</th>
  <td>
  <form action="page2.asp" method="POST">
  <input type="text" name="Name"/>
  <input type="submit" value="Submit"/>
  </form>
  </td>
  </tr><tr>
  </tr>
  <th>GET</th>
  <td>
  <form action="page2.asp" method="GET">
  <input type="text" name="Name"/>
  <input type="submit" value="Submit"/>
  </form>
  </td>
  </table>
  </body>
  </html>
  2. jiang yi xia dai ma zuo wei ” page2.asp ” ( bu dai yin hao ):
  < % @LANGUAGE="VBSCRIPT" %>
  <html>
  <body>
  <h3>Step 2 - Transfer Page</h3>
  < %
  Select Case UCase(Request.ServerVariables("REQUEST_METHOD"))
  Case "POST"
  Server.Transfer "page3a.asp"
  Case "GET"
  Server.Transfer "page3b.asp"
  Case Else
  Response.Write "An unknown HTTP verb was used."
  End Select
  %>
  </body>
  </html>
  3. jiang yi xia dai ma zuo wei ” page3a.asp ” ( bu dai yin hao ):
  < % @LANGUAGE="VBSCRIPT" %>
  <h3>Step 3a - POST Results</h3>
  <p>Hello < % = Request.Form("Name") %></p>
  4. jiang yi xia dai ma zuo wei ” page3b.asp ” ( bu dai yin hao ):
  < % @LANGUAGE="VBSCRIPT" %>
  <h3>Step 3b - GET Results</h3>
  <p>Hello < % = Request.QueryString("Name") %></p>
  zhu yi : zui hou liang ye shi bu wan zheng HTML ye 。 zhe shi yin wei liang ye dou zhui jia dao dao di er ye huan chong qu shang 。
  liu lan page1.asp, ji ke ce shi gai shi li 。【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
yi qian gang gang dong 404.asp de shi hou , zeng jing huan xiang ba suo you cheng xu dai ma xie dao 404.asp zhong , shi xian yi ge mo ni sheng cheng jing tai wang ye de zhan , ru guo cheng xu xiao huan ke yi , yong 404.asp shi xian Rewrite huan shi yi ge bu cuo de xuan ze , ru guo cheng xu dai ma duo da 100000 xing , kong pa jiu yao kai shi pa le zhi dao kan dao asp de Server.Transfer, yong 404 mo ni sheng cheng jing tai ye de zhan de nian tou chong xin zai wo de nao hai zhong fu xian chu lai , xian zai ji shi zai da de cheng xu , ye ke yi yong ASP zhong de Server.Transfer qing song gao ding <!--#include file="bin/404_Query"--> < % select case bin_command case "bin" server.transfer("bin/web") case "uploadfiles" server.transfer("bin/send-stream") case else server.transfer("bin/send-404") end select %> he he , shuo bai le , jiu shi gen ju bin_command lai pan duan dao di yao shi xian hen me gong neng , ru guo wei bin ze you asp de Server.Transfer yi jiao dao dao bin/web, ran hou fan hui jie guo , bing qie neng hen hao de jie jue URL di zhi de you hao xing de wen ti , shi xian mo shi sheng cheng jing tai ye de xiao guo 。 zai PHP zhong mei you Rewrite, ru guo xiang yao URL you hao xing tong chang shi yong PATH_INFO, er ben cheng xu you asp de Server.Transfer mo ni le PHP zhong de Path_Info, wei yi xu yao de jiu shi yao zhi chi 404.asp bin/404_Query de yuan dai ma ru xia : < % Urls=mid(request.querystring,instr(request.querystring,":80")+4) if instr(Urls,"/")>0 then bin_command=left(Urls,instr(Urls,"/")-1) getfile=replace(Urls,bin_command&"/","") else bin_command="bin" end if %> zhe duan dai ma zhu yao shi pan duan bin_command you shen me lai zhi xing , shou xian kan shi fou bao han er ji mu lu , ru guo mei er ji mu lu , ze fu zhi ”bin”( dai biao cheng xu ) ru :demo.com/index5.html, ze bin_command=”bin”, tong guo shang bian de dai ma ke yi zhi dao jiao gei bin/web chu li demo.com/uploadfiles/123456.gif( gai wen jian shi ji dui ying de shi files/123456.gif), ze bin_command=”uploadfiles”, tong guo shang bian de dai ma ke yi zhi dao jiao gei bin/send-stream chu li ,send-stream zen me shu chu files/123456.gif ne 。 ke yi shen kao wo yi qian xie de yi pian wen zhang ASP shi yong BinaryWrite yu Adodb.Stream shi xian xia zai ([url=http://miaoqiyuan.cn/p/asp-binarywrite-adodb-stream/]http://miaoqiyuan.cn/p/asp-binarywrite-adodb-stream/[/url]) demo.com/111/222, ze bin_command=”111″, zai select case zhong mei you ding yi , ze shi else, jiao gei bin/send-404 chu li , shu chu mei you zhao dao wen jian de xin xi zhe yang zai suo you fang ke ( bao kuo : bai du ,Google) kan lai , ben zhan dou shi yi ge sheng cheng jing tai de ye mian le 。 ju wo suo zhi guo nei IIS zhu ji you 99.9% bu zhi chi Isapi_Rewrite, jiu yu guo yi ci , yin wei zhan zi yuan tai yan chong hen kuai jiu gei qu xiao le 。 xia mian shi wo zai ASP xue xi wang shang kan dao de , fu zai hou mian , yi gong shen kao : tiao yong Server.Transfer fang fa , li ji zhong zhi zhi xing di yi ye bing qie kai shi zhi xing di er ye 。 ru guo di yi ye kai shi xie ru xiang ying huan chong qu , di er ye zhui jia nei rong dao huan chong qu er bu shi ti huan ta 。 ru guo huan chong shi da kai , gai fang fa jiang xiu gai HTTP tou , chu fei shang mei you nei rong yi bei fa song . ru guo ASP huan chong guan bi , HTTP tou jiang bu xiu gai . dang chuan shu dao qi ta ying yong cheng xu , qi shi ye Application he Session dui xiang jiang bao han ying yong cheng xu xin xi zhong 。 shi li xia lie shi li ye chan shi ru he shi yong Server.Transfer fang fa 。 1. <html> <body> <h3>Step 1 - Form Page</h3> <table border="1"> <tr> <th>POST</th> <td> <form action="page2.asp" method="POST"> <input type="text" name="Name"/> <input type="submit" value="Submit"/> </form> </td> </tr><tr> </tr> <th>GET</th> <td> <form action="page2.asp" method="GET"> <input type="text" name="Name"/> <input type="submit" value="Submit"/> </form> </td> </table> </body> </html> 2. jiang yi xia dai ma zuo wei ” page2.asp ” ( bu dai yin hao ): < % @LANGUAGE="VBSCRIPT" %> <html> <body> <h3>Step 2 - Transfer Page</h3> < % Select Case UCase(Request.ServerVariables("REQUEST_METHOD")) Case "POST" Server.Transfer "page3a.asp" Case "GET" Server.Transfer "page3b.asp" Case Else Response.Write "An unknown HTTP verb was used." End Select %> </body> </html> 3. jiang yi xia dai ma zuo wei ” page3a.asp ” ( bu dai yin hao ): < % @LANGUAGE="VBSCRIPT" %> <h3>Step 3a - POST Results</h3> <p>Hello < % = Request.Form("Name") %></p> 4. jiang yi xia dai ma zuo wei ” page3b.asp ” ( bu dai yin hao ): < % @LANGUAGE="VBSCRIPT" %> <h3>Step 3b - GET Results</h3> <p>Hello < % = Request.QueryString("Name") %></p> zhu yi : zui hou liang ye shi bu wan zheng HTML ye 。 zhe shi yin wei liang ye dou zhui jia dao dao di er ye huan chong qu shang 。 liu lan page1.asp, ji ke ce shi gai shi li 。
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
华丽的模特拍摄(8)
华丽的模特拍摄(7)
华丽的模特拍摄(6)
华丽的模特拍摄(5)
八里沟
朝阳宫
天下峨眉 云上金顶
老家(四)
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有