File.Exists 判断不了虚拟路径

https://www.shuzhiduo.com/topic/file-exists-%E5%88%A4%E6%96%AD%E4%B8%8D%E4%BA%86%E8%99%9A%E6%8B%9F%E8%B7%AF%E5%BE%84/

通过虚拟路径,判断文件不存在一直返回false。

网上查了下,有说虚拟路径判断不出来的,然后改为Server.MapPath获取路径,再用file.exists判断,成功返回ture。

posted @ 2023-03-02 01:27  yinghualeihenmei  阅读(34)  评论(0编辑  收藏  举报