下面的代码显示了我如何创建Path/Directory
本地机器。现在,我想将我的应用程序放到实时服务器上,但我的问题是它在实时服务器上为给定路径创建了一个文件,我该如何实现呢?
`string appPath = Request.PhysicalApplicationPath;
string IPAddress = HttpContext.Current.Request.UserHostAddress;
Directory.CreateDirectory(appPath + "//PrintFiles/" + IPAddress");
StreamWriter w;
w = File.CreateText(appPath + "//PrintLabels/" + IPAddress + "/printLabels.txt");
w.WriteLine(fileContents.ToString());
w.Flush();
w.Close();`