如何创建文件夹 [英] How to create a folder

查看:121
本文介绍了如何创建文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能在根目录中创建第一个文件夹,然后在该文件夹中创建xml



  var  fileName = Server.MapPath( )+ < span class =code-string>  books +   + now.Year +    -  + now。月+    -  + now.Day +  。xml; 

解决方案

实际上很简单,请参阅 http://msdn.microsoft.com/en-us/ library / vstudio / as2f1fez(v = vs.110).aspx [ ^ ]



此外,请注意,由于这是ASP.Net,您需要授予对运行应用程序池的帐户的适当权限。


这是一个课程:https://msdn.microsoft.com/en-us/library/vstudio/as2f1fez(v=vs.110).aspx [ ^ ]

How could i create first a folder in the root and then create the xml in that folder

var fileName = Server.MapPath("~") + "books"+ " " + now.Year + "-" + now.Month + "-" + now.Day + ".xml";

解决方案

It's actually quite simple, see http://msdn.microsoft.com/en-us/library/vstudio/as2f1fez(v=vs.110).aspx[^]

Also, be aware that since this is ASP.Net you'll need to grant the proper permissions to the account that is running your app pool.


Here is a course:https://msdn.microsoft.com/en-us/library/vstudio/as2f1fez(v=vs.110).aspx[^]


这篇关于如何创建文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆