PHP File Upload Response

时间:2015-05-11 06:03:03

标签: php cordova file-upload xampp server

I am sending a file to the server using phonegap filetransfer plugin. File Transfer plugin is showing transfer successful but when i checked my server no file is there. When i checked the response code it is showing the following:

Array(
[file]=>Array
(
 [name]=> hlc_parkingkanyakumari11-5-2015 1183232.db
 [type]=>
 [tmp_name]=>
 [error]=>1
 [size]=>0

)
)false

can anyone explain this error.My filesize is 4.1MB. I changed the upload_max_filesize to 10M but still this response is coming from the server.
i am testing it on my local server(XAMPP)

1 个答案:

答案 0 :(得分:0)

谢谢大家的回复。我找到了解决问题的方法。我检查了php错误日志,它显示以下错误

POST Content-Length of 4456596 bytes exceeds the limit of 3145728 bytes in Unknown on line 0

然后我检查php.ini文件中的post_max_size值。它设置为3M,小于我试图传输的文件大小。我将值改为8M,现在它正常工作。