/*********************************************************************************
   **  IIS homedirctory在c:\inetpub\wwwroot         **
   **  虚拟目录在E:\WebApplication10.           **
   **  目前的程序在E:\WebApplication10\tmp文件夹下的一个页面.     **
   *********************************************************************************/
   string str = Server.MapPath("~/languages.xml");
   //str=E:\WebApplication10\languages.xml

   string str1 = Server.MapPath("./languages.xml");
   //str1=E:\WebApplication10\tmp\languages.xml

   string str2 = Server.MapPath("../languages.xml");
   //str2=E:\WebApplication10\languages.xml


   string str3 = Server.MapPath("mm/languages.xml");
   //str3=E:\WebApplication10\tmp\mm\languages.xml

   string str4 = Server.MapPath("/mm/languages.xml");
   //str4=c:\inetpub\wwwroot\mm\languages.xml

相关文章:

  • 2021-06-18
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-11-24
  • 2021-07-31
猜你喜欢
  • 2022-01-10
  • 2022-01-18
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-11-10
  • 2021-12-20
相关资源
相似解决方案