In fact, this leads to the problem of server output control and browser cache, which is a bit complicated and will be studied again later. When uploading and generating a thumbnail, the link displayed by the thumbnail is as follows;
The code is as follows:
The thumbnail is not displayed in ie6. the following code is traced back:
The code is as follows:
Header ("Content-type: image/jpeg ");
Header ("Content-Length:". strlen ($ _ SESSION ["fileInfo"] [$ image_id]);
Echo $ _ SESSION ["fileInfo"] [$ image_id];
Unset ($ _ SESSION ['fileinfo'] [$ image_id]); //
Exit (0 );
So I wondered if it was unset before the display was too late? The deletion is successful. Later changed to the following code:
The code is as follows:
Header ("Content-type: image/jpeg ");
Header ("Content-Length:". strlen ($ _ SESSION ["fileInfo"] [$ image_id]);
Echo $ _ SESSION ["fileInfo"] [$ image_id];
/** Output the above session immediately. the thumbnails generated in ie6 are cleared by the unset ($ _ SESSION ['']) below before they are displayed, as a result, ie6 cannot display thumbnails */
Echo $ str. str_repeat ('', 256); // Some browsers must output up to 256 characters
Ob_flush ();
Flush (); // both must be used together.
Unset ($ _ SESSION ['fileinfo'] [$ image_id]); //
Exit (0 );
In fact, this leads to the problem of server output control and browser cache, which is a bit complicated and will be studied again later.