14.我自己写的上传函数
public static string upfile(system.web.ui.page p,system.web.ui.htmlcontrols.htmlinputfile file1){
//上传文件
if (file1.postedfile != null)
{
try
{
string spath=p.server.mappath(p.request.applicationpath)+configurationsettings.appsettings["uppath"];
string fpath=oa.cls.globalstate.makerand(10)+system.io.path.getfilename(file1.postedfile.filename);
spath+=fpath;