关键词搜索

源码搜索 ×
×

C# 将数据写入当前程序安装目录某文件夹下

发布2014-01-08浏览3006次

详情内容

  1. public static string GetXmlFullPath(string strPath)
  2. {
  3. string filePath = GetPhysicalPath();
  4. if (filePath.IndexOf(":") > 0)
  5. {
  6. return filePath;
  7. }
  8. else
  9. {
  10. return null;
  11. }
  12. }
  13. //获取配置文件的物理路径
  14. public static string GetPhysicalPath()
  15. {
  16. //获得当前程序运行的物理路径比如F:\XFU.NSQS\project\Application\
  17. string filePath = HttpContext.Current.Request.PhysicalApplicationPath;
  18. int n = filePath.IndexOf("获取程序安装文件夹下某个文件名AA"); ;
  19. filePath = filePath.Substring(0,n) + "获取程序安装文件夹下某个文件名AA" + "\\文件夹AA下的某个xml文件(用来存储相关信息)";
  20. return filePath;
  21. }


相关技术文章

最新源码

下载排行榜

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载