$PBExportHeader$f_get_tmpfilename.srf global type f_get_tmpfilename from function_object end type forward prototypes global function integer f_get_tmpfilename (string arg_path, ref string arg_tmpfileanme, ref string arg_msg) end prototypes global function integer f_get_tmpfilename (string arg_path, ref string arg_tmpfileanme, ref string arg_msg);//返回临时文件 //f_get_tmpfilename(arg_path,arg_tmpfileanme,arg_msg) int rslt=1 string tmp_filename,tmp_name,tmp_path int dot_pos tmp_name="~~"+ string(today(),'yyyymmdd') + string(now(),'hhmmss')+'.tmp' tmp_path=arg_path if right(arg_path,1)='\' then tmp_filename = arg_path + tmp_name goto ext else tmp_path = Reverse ( tmp_path ) dot_pos=pos(tmp_path,'\') if dot_pos <= 0 then arg_msg='非法的文件路径>>'+arg_path rslt=0 goto ext end if tmp_filename=left(arg_path,len(arg_path) - dot_pos + 1 ) + tmp_name end if arg_tmpfileanme = tmp_filename ext: return rslt end function