没有\的Server.Mappath返回地址 [英] Server.Mappath return address without \

查看:82
本文介绍了没有\的Server.Mappath返回地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 Server.MapPath("/Uploads/CrystalReport1.rpt")

Server.MapPath("~/Uploads/CrystalReport1.rpt")



返回地址没有\


Returning address without \

D:WEBDATAmydomain.comUploadsCrystalReport1.rpt



但我预计


But i expected

D:\WEBDATA\mydomain.com\Uploads\CrystalReport1.rpt

推荐答案

这不是API Server.MapPath 给你错误的字符串,但你的观察是错误的。它总是正常工作。在调试器下运行它或记录此字符串以查看。



-SA
This is not the API Server.MapPath gives you wrong string, but your observation is wrong. It always works correctly. Run it under the debugger or log this string to see.

—SA


这篇关于没有\的Server.Mappath返回地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆