[英]upload file from android to php server
I am trying to upload a image from my android app to my php server. 我正在尝试将图像从我的android应用程序上传到我的php服务器。 It is working fine in server side when i am using basic php upload code like
当我使用基本的php上传代码时,在服务器端工作正常
move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $file_path)
But when i am trying to upload in server using codeigniter it can't.. my codeigniter code is 但是,当我尝试使用codeigniter在服务器中上传时,它无法..我的codeigniter代码是
$config['upload_path'] = './uploads/companyLicDoc/';
$config['file_name']="test.jpg";
$config['overwrite']='TRUE';
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$config['max_size'] = '2024';
$config['max_width'] = '2024';
$config['max_height'] = '1768';
$this->load->library('upload', $config);
$this->upload->do_upload("uploaded_file");
help me please.. 请帮帮我..
Try using this line: 尝试使用此行:
echo $this->upload->display_errors();
this will show you the error message behind the failing upload process which it might be: 这将向您显示失败的上传过程背后的错误消息,可能是:
"uploaded_file"
. "uploaded_file"
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.