Uploadify upload picture, first normal, second to third error

Source: Internet
Author: User
Title, such as the head of the station

But not everyone, my test is normal, but the customer, the first successful upload, the 23rd one failed, and the fourth is a smooth upload, this is how it happened

I put $_files print_r out all normal, but the place of the thumbnail is the 23rd one will be wrong, is there wrong, I ask you greatly.

$src_x = imagesx($src);$src_y = imagesy($src);if($src_x > $src_y){$s_thumb_x=250;$s_thumb_y = intval($src_y / $src_x * 250);$thumb_x = 600; $thumb_y = intval($src_y / $src_x * 600);}else{$s_thumb_y = 303;$s_thumb_x = intval($src_x / $src_y * 303);$thumb_y=904; $thumb_x = intval($src_x / $src_y * 904);}//第二三张时,这里会错误           $thumb = imagecreatetruecolor($thumb_x, $thumb_y);第二三张时,这里会错误//$sthumb = imagecreatetruecolor($s_thumb_x, $s_thumb_y);imagecopyresampled($thumb, $src, 0, 0, 0, 0, $thumb_x, $thumb_y, $src_x, $src_y);// 第二三张时,这里会错误imagecopyresampled($sthumb, $src, 0, 0, 0, 0, $s_thumb_x, $s_thumb_y, $src_x, $src_y);imagejpeg($thumb, $ofile);imagejpeg($sthumb, $sfile);

Reply content:

Title, such as the head of the station

But not everyone, my test is normal, but the customer, the first successful upload, the 23rd one failed, and the fourth is a smooth upload, this is how it happened

I put $_files print_r out all normal, but the place of the thumbnail is the 23rd one will be wrong, is there wrong, I ask you greatly.

$src_x = imagesx($src);$src_y = imagesy($src);if($src_x > $src_y){$s_thumb_x=250;$s_thumb_y = intval($src_y / $src_x * 250);$thumb_x = 600; $thumb_y = intval($src_y / $src_x * 600);}else{$s_thumb_y = 303;$s_thumb_x = intval($src_x / $src_y * 303);$thumb_y=904; $thumb_x = intval($src_x / $src_y * 904);}//第二三张时,这里会错误           $thumb = imagecreatetruecolor($thumb_x, $thumb_y);第二三张时,这里会错误//$sthumb = imagecreatetruecolor($s_thumb_x, $s_thumb_y);imagecopyresampled($thumb, $src, 0, 0, 0, 0, $thumb_x, $thumb_y, $src_x, $src_y);// 第二三张时,这里会错误imagecopyresampled($sthumb, $src, 0, 0, 0, 0, $s_thumb_x, $s_thumb_y, $src_x, $src_y);imagejpeg($thumb, $ofile);imagejpeg($sthumb, $sfile);

I can't afford to be big, I found the wrong place ....

$src of a line = @imagecreatefrompng ($_files[' Filedata ' ["tmp_name"]); Bugs

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.