Home > Backend Development > PHP Tutorial > How to implement statistics on email size in PHP_PHP Tutorial

How to implement statistics on email size in PHP_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:00:33
Original
820 people have browsed it

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:

Copy the code The code is as follows:

$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
true
http: //www.bkjia.com/PHPjc/328075.html

TechArticle

To count how much space a user’s inbox takes up, first calculate the size of each email (title + content + nearby ), then sum; 1. Calculate nearby size; 2. Calculate title and content size 3. Total...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template