fetch1("select fileid,path,filename,classid,fpath from {$dbtbpre}enewsfile_1 where fileid='$fileid'"); if(empty($r[fileid])) { printerror("ErrorUrl","history.go(-1)",1); } //下载数加1 $sql=$empire->query("update {$dbtbpre}enewsfile_1 set onclick=onclick+1 where fileid='$fileid'"); $ok=1; //按栏目 $fspath=ReturnFileSavePath($r[classid],$r[fpath]); $filepath=$r[path]?$r[path].'/':$r[path]; $downurl=$fspath['fileurl'].$filepath.$r[filename]; if($ok) { Header("Location:$downurl"); } } //下载附件 $fileid=(int)$_GET['fileid']; DoDownFile($fileid); db_close(); $empire=null; ?>