zoukankan      html  css  js  c++  java
  • Server.MapPath 的使用方法

    在写ASP程序的时候,尤其是用到FSO组件来生成一些文件夹或者文件的时候,经常要用到路径这个概念,但是我们又不能实际操作服务器,所以虚拟路径这时候就显的特别重要,其实大部分情况,我们都是用的虚拟路径。以下就虚拟路径这个概念总结了一下: ./当前目录 /根目录 ../上层目录(相对当前来说)

    如果当前的网站目录为D:wwwroot    浏览的页面路径为D:wwwrootcompany ewsshow.asp

    在show.asp页面中使用

               Server.MapPath("./")   返回路径为:D:wwwrootcompany ews

                                   Server.MapPath("/")    返回路径为:D:wwwroot

                                  Server.MapPath("../")    返回路径为:D:wwwrootcompany

     server.MapPath(request.ServerVariables("Path_Info"))

     Request.ServerVariables("Path_Translated") 

    上面两种方式返回路径为 D:wwwrootcompany ewsshow.asp

  • 相关阅读:
    51nod 1185 威佐夫游戏 V2
    51nod 1212 无向图最小生成树
    51nod 1242 斐波那契数列的第N项
    51nod 1240 莫比乌斯函数
    51nod 1256 乘法逆元
    51nod 1264 线段相交
    51nod 1265 四点共面
    51nod 1298 圆与三角形
    51nod 2006 飞行员配对
    CGLIB介绍与原理
  • 原文地址:https://www.cnblogs.com/jiangnini/p/3435129.html
Copyright © 2011-2022 走看看