When uploading and generating a thumbnail, the link displayed by the thumbnail is as follows;
Copy codeThe Code is as follows:
The thumbnail is not displayed in ie6. The following code is traced back:
Copy codeThe 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:
Copy codeThe 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.