本文介绍了充分利用物理路径的相对虚拟路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能在asp.net的物理路径的相对虚拟路径?
相反的方法是象下面这样:
How can I get the relative virtual path from the physical path in asp.net?The reverse method is like below:
Server.MapPath("Virtual Path Here");
但什么是方法上的反向?
But what is the reverse of the upper method?
推荐答案
也许的是你在找什么。
在那里,他们建议:
Maybe this question is what you're looking for.There they suggest:
String RelativePath = AbsolutePath.Replace(Request.ServerVariables["APPL_PHYSICAL_PATH"], String.Empty);
这篇关于充分利用物理路径的相对虚拟路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!