我正在使用PHP,jQuery / Ajax调用验证带有upload字段的表单。
现在如果上传的文件大小很大(现在是8MB),那么它需要花费很长时间(只需要花费3.7分钟)来响应!
我不明白为什么要花很多时间!
jQuery / Ajax代码:
$('#register').submit(function( e ) {
e.preventDefault();
var formData = $('form').get(0);
$.ajax({
type : 'POST',
dataType : 'html',
data: new FormData(formData),
url : 'process/ccroipr-cat-p.php',
cache:false,
contentType: false,
processData: false,
beforeSend : function () {
$('#result').html( 'Please wait...' );
$('#registerButton').prop('disabled', true);
},
success : function ( result ) {
$('#registerButton').prop('disabled', false);
$('#result').html( result );
}
});
});
PHP代码:
注册页面链接:
ccroipr.org/register.php