如何使用Server.MapPath [英] How can I use Server.MapPath
本文介绍了如何使用Server.MapPath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我使用了此语句,但它不起作用
Hello
I use this statement but it dose not work
string root = Server.MapPath("~/");
string root = Server.MapPath("/Project");
是什么问题?
What''s the problem?
推荐答案
路径开头的斜杠(/)表示该站点的绝对虚拟路径.虚拟路径中是否存在项目?
The slash (/) at the beginning of the path indicates an absolute virtual path to the site. Is project available in your virtual path?
这篇关于如何使用Server.MapPath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文