All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
使用PagedDataSource类实现DataList和Repeater控件的分页显示_.net资料_编程技术
在MySQL中定义外键_php资料_编程技术
LINQ体验(14)——LINQ,to,SQL语句之存储过程_[Asp.Net教程]
PHP实例程序:用PHP制作登录页面程序_php资料_编程技术
ASP.NET:一段比较经典的多线程学习代码_[Asp.Net教程]
C#随机生成汉字验证码代码_[Asp.Net教程]
Visual C++ 6.0教程:c++程序的组成之常量与变量
ASP.NET,MVC框架(第一部分)_[Asp.Net教程]
PHP字符串匹配函数strstr_php资料_编程技术
PHP入门:在PHP关于变量的使用介绍_[PHP教程]
Reading number is top 10 pictures
The real super beauty1
HongMenYan premiere XinLiangGong clairvoyant outfit PK YiFeiLiu1
壮丽的云彩1
Catch prostitution woman in China
性感丰满身材火爆de美女1
The world first motorcycle will be auctioned for 21000 pounds
The little girl with long hair3
大四女生借债隆胸成功
2013中国四川省高考作文
So beauty, will let you spray blood7
Download software ranking
Proficient in Eclipse
Unix video tutorial1
WebService在.NET中的实战应用教学视频 → 第1集
Ashlynn Video3
株洲本地在线棋牌游戏
超级战舰
SP4 for SQL2000
传奇私服架设教程-chm
Tram sex maniac 2 (H) rar bag18
Boxer's Top ten classic battle4
归海一刀 published in(发表于) 2014/1/30 1:19:52 Edit(编辑)
asp.net判断文件或文件夹是否存在_[Asp.Net教程]

asp.net判断文件或文件夹是否存在_[Asp.Net教程]

asp.net判断文件或文件夹是否存在_[Asp.Net教程]
在上传文件时经常要判断文件夹是否存在,如果存在就上传文件,否则新建文件夹再上传文件
判断语句为
if (System.IO.Directory.Exists(Server.MapPath("file")) == false)//如果不存在就创建file文件夹
{
System.IO.Directory.CreateDirectory(Server.MapPath("file"));
}
System.IO.Directory.Delete(Server.MapPath("file"),true);//删除文件夹以及文件夹中的子目录,文件

判断文件的存在
if (System.IO.File.Exist(Server.MapPath("~/Back/Data.xml"))
{
//存在文件
}
else
{
//不存在文件
Directory.Create(Server.MapPath("~/Back/Data.xml"));//创建该文件
}


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.