Ask two questions: the imagecreatefromjpeg function of php and the function of ajax1 and imagecreatefromjpeg will crash and directly jump out of the current connection under what circumstances? 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 larger than 1 MB. ask two questions: imagecreatefromjpeg of php and ajax.
1. under what circumstances will the imagecreatefromjpeg function cause a crash and directly 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 );
} Else {
/****** After successful ******/
}
}
});
Can I still pass a json Array to d? But why is Stack Overflow reported after I pass it?
------ Solution --------------------
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.