Ask two questions: php's imagecreatefromjpeg and ajax 1. under what circumstances will the imagecreatefromjpeg function crash and jump out of the current connection?
The current situation is that I have a file of more than 500 K, and the file gets stuck every time the thumbnail is generated. No error is Prompted. a blank page is displayed. This problem does not occur for others that are larger than 1 MB.
Is there any other solution besides modifying php. ini?
2. when I use ajax:
JQuery. ajax ({type: "post", url: "dialog. php? A = sift ", data: {" cid ": n," data ": d}, dataType:" json ", success: function (data, textStatus) {if (data. res = 0) {alert (data. msg);} after else {/******* succeeds ******/}}});
Can I still pass a json Array to d? But why is Stack Overflow reported after I pass it?
Reply to discussion (solution)
JQuery. ajax ({type: "post", url: "dialog. php? A = sift ", data: {" cid ": n," d}, dataType: "json", success: function (data, textStatus) {if (data. res = 0) {alert (data. msg);} after else {/******* succeeds ******/}}});
Fix It. add a color for the d above.
JQuery. ajax ({type: "post", url: "dialog. php? A = sift ", data: {" cid ": n," data ": d}, dataType:" json ", success: function (data, textStatus) {if (data. res = 0) {alert (data. msg);} after else {/******* succeeds ******/}}});
Dizzy, I don't know whether it's my computer card or the csdn card. I deleted more. this time it's okay.
1. when the total number of pixels of an image exceeds the preset value of GD
However, I have not seen any description about the upper limit. in the past, php4 seemed to have a upper limit of 1024*768.
But you can test it yourself.
Ini_set can dynamically set variables that can be modified
2. {"cid": n, "data": d}
If d = {"cid": n, "data": d}
It must be "Stack Overflow" because it is recursive.
Jq is sent only after the js object is constructed into a string.
Understand. Thank you, moderator.