您的位置:首页 > 其它

各类语言对文件的操作

2008-12-23 16:06 288 查看
1、c#

写文件:

读文件:

删除文件:

public static string DeleteFile(string path)
{
if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(path)))
{
System.IO.File.Delete(System.Web.HttpContext.Current.Server.MapPath(path));
return "yes";
}
return "no";
}

2、php

写文件:

读文件:

删除文件:

3、asp

写文件:

读文件:

删除文件:

4、java

写文件:

读文件:

删除文件:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: