Uploadify uploads the image. The first image is normal, and the second and third images are incorrect.

Source: Internet
Author: User
Tags imagejpeg
For example, this is the case with the title, but not everyone. my local test is normal, but the customer, the first one, the second three, fails, and the fourth one is uploaded again, what is going on here? I can get $ _ FILESprint_r out normally, but the second or third figure will be wrong ,... such as question, such as head

But not everyone is doing this. my local test is normal, but the customer, the first upload is successful, the second three Upload fails, and the fourth upload is smooth. what is going on?

I can print $ _ FILES print_r out normally, but the second or third figure will be incorrect. it is an error there.

$ 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);} // The Error $ thumb = imagecreatetruecolor ($ thumb_x, $ thumb_y) is returned here when the second three items are used, the following error occurs: // $ sthumb = imagecreatetruecolor ($ s_thumb_x, $ s_thumb_y); imagecopyresampled, $ src_x, $ src_y); // in the second three, 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:

Such as question, such as head

But not everyone is doing this. my local test is normal, but the customer, the first upload is successful, the second three Upload fails, and the fourth upload is smooth. what is going on?

I can print $ _ FILES print_r out normally, but the second or third figure will be incorrect. it is an error there.

$ 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);} // The Error $ thumb = imagecreatetruecolor ($ thumb_x, $ thumb_y) is returned here when the second three items are used, the following error occurs: // $ sthumb = imagecreatetruecolor ($ s_thumb_x, $ s_thumb_y); imagecopyresampled, $ src_x, $ src_y); // in the second three, imagecopyresampled ($ sthumb, $ src, 0, 0, 0, 0, $ s_thumb_x, $ s_thumb_y, $ src_x, $ src_y); imagejpeg ($ thumb, $ ofile); imagejpeg ($ sthumb, $ sfile );

Sorry, everyone. I found the location of zookeeper .....

$ Src = @ imagecreatefrompng ($ _ FILES ['filedata'] ["tmp_name"]) of a row; too many

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.