非Web程序获取路径几种方法如下: 1.AppDomain.CurrentDomain.BaseDirectory 2.Environment.CurrentDirectory 3.HttpRuntime.BinDirectory The path to the current application's/bin directory: Web程序 HttpCurrent.Context.Server.Mappath() HttpContext.Current返回当前请求的 HttpCo…
原文发布时间为:2009-11-21 -- 来源于本人的百度文章 [由搬家工具导入] 请先学习:http://hi.baidu.com/handboy/blog/item/bfef61000a67ea16738b6565.html string x = "Live for nothing,die for something";Regex r = new Regex(@"^Live for no(?<g1>[a-z]{5}),die for some\1$"…
function getRealPath(){ //获取当前网址,如: http://localhost:8083/myproj/view/my.jsp var curWwwPath=window.document.location.href; //获取主机地址之后的目录,如: myproj/view/my.jsp var pathName=window.document.location.pathname; var pos=curWwwPa…