需要VB网站的源目录 [英] need source directory for VB web
问题描述
一旦我的VB网站启动,哪个函数将返回其源代码目录?
Once my VB web starts, what function returns the directory of its source code?
我那里有一些需要访问的数据文件.
I have some data files there that it needs to access.
例如,如果我的Web程序位于C:\ test \ source
程序如何获取该目录?
Like, if my web program is at C:\test\source
how can the program get this directory?
感谢
推荐答案
请记住,源代码可能完全位于在另一台计算机上,为什么不将数据文件放在运行该应用程序的文件夹中?
Bearing in mind that the source code could be on a totally different computer, why not put the data files in a folder where the app is running?
我认为您正在寻找HttpRuntime.AppDomainAppPath-获取当前应用程序域中托管的应用程序的应用程序目录的物理驱动器路径."
I think you're looking for HttpRuntime.AppDomainAppPath - "Gets the physical drive path of the application directory for the application hosted in the current application domain."
-
安德鲁
这篇关于需要VB网站的源目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!