To count how much space a user’s inbox takes up, first calculate the size of each email (title + content + vicinity), and then add the sum;
1. Calculate the size of the vicinity;
2. Calculate the title and content size
3. Calculate the size of a single email by summing it up
Case:
$attach_size= 0;
if($attachmentid){ //Get the nearby size > $attach_data= attachdata($attachmentid); > , "wb");
fwrite($_file, $subject.$content);
fclose($_file);
if($_temp= filesize($_filename)){
$email_content_size = $_temp;
}
$del_ret= @unlink($_filename);
$sum_size= $attach_size*1024 + $email_content_size; //Total size of email
?>
http://www.bkjia.com/PHPjc/328075.html
www.bkjia.com
http: //www.bkjia.com/PHPjc/328075.html