摘要: 再导入html简历的时候,页面中会出现 431 这种全角字符,这种是不能导进数据库的,必须把它转换为半角字符。 workDate = Regex.Match(strWork, sname).Value; //字符串转换为字符数组 char[] c = workDate.ToCharArray(); //循环字符数组 for (int i = 0; i 65280 && cqj < 65375) { //全角转换为半角字符 cqj = (char)(cqj - 65248); //全角替换为半角 workDate = Regex.Match(strWork, sname). 阅读全文
posted @ 2014-03-18 22:39 小飞侠24 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 这几天做一个html页面导入数据库的功能,其中要操作件夹中的文件,首先引入命名空间System.IO 下Directory类和File类获得文件夹中所有文件:string[] filenames = System.IO.Directory.GetFiles(context.Server.MapPath("~/weboa/HtmlCloud/"));//获取文件的全路径 string path = context.Server.MapPath("~/weboa/HtmlCloud/");删除指定的文件//删除指定文件,先判断文件是否存在 if (Syste 阅读全文
posted @ 2014-03-18 12:58 小飞侠24 阅读(173) 评论(0) 推荐(0) 编辑