21,893
社区成员




$image_name = mktime().mt_rand(10000,100000).$_FILES['file']['name']; //图像的新名字
move_uploaded_file($_FILES['file']['tmp_name'],iconv("UTF-8", "gb2312", BASEIMAGEPATH.'/'.$image_name)); //移动图像
$fn = array_pop( explode( '/', strtr( $this->filename, '', '/' ) ) );
header( "Pragma: public" );
header( "Expires: 0" ); // set expiration time
header( "Cache-Component: must-revalidate, post-check=0, pre-check=0" );
header( "Content-type:".$this->mineType );
header( "Content-Length: " . filesize( $this->filename ) );
header( "Content-Disposition: attachment; filename=" . $this->fileDesc . "." . $this->filetype );
header( 'Content-Transfer-Encoding: binary' );
readfile( $this->filename );
return true;