When I upload a thumbnail, the thumbnail shows a link to the following image;
Copy Code code as follows:
< img src = "/index.php?action=sys_upload_showthumb&id=bdc3955470adfb5637a0d1f517eb3d35"/>
The result does not show the thumbnail in IE6, and then goes back to the following code:
Copy Code code 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 think it's too late to show it was unset? So the deletion was successful. It was later changed to the following code:
Copy Code code as follows:
Header ("Content-type:image/jpeg");
Header ("Content-length:" Strlen ($_session["FileInfo"] [$image _id]);
echo $_session["FileInfo" [$image _id];
/** immediately output the session above, solve the IE6 under the generated thumbnail has not been shown before has been unset ($_session[']) empty, resulting in IE6 can not show the situation of thumbnails * *
Echo $str. Str_repeat (', 256); Some browsers will not output until the output reaches 256 characters
Ob_flush ();
Flush (); These two must be used in one piece.
unset ($_session[' fileInfo '] [$image _id]);
Exit (0);
In fact, this leads to the server's output control and browser caching problem, which is a bit complicated, and then have the opportunity to study.