Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个网页需要读取托管该页面的网络服务器上的状态文件。该文件位于网络服务器的硬盘驱动器上,而不是在 inetpub/wwwroot/... 我知道如果它与网页位于同一目录中,但如果它位于不同目录中则不知道如何访问该文件。
有没有办法做到这一点?
您无法通过设计访问位于 wwwroot 文件夹“上方”的文件。执行此操作的方法是 a) 将文件复制到那里,b) 设置符号链接(如果在 linux 上)或 c) 最好移动/设置另一个 Web 根文件夹。
或者,编写一个服务器脚本来转储文件内容。