codeigniter do_upload
功能在000webhost
中不起作用
我已将uploads
文件夹权限设置为777
如果我在XAMPP
中执行此操作,它会起作用,但在000webhost
ftp中它不会
以下部分显示了我的代码:
function do_upload()
{
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'xls|xlsx';
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
redirect('customer/viewCustomer');
}
else
{
$data = array('upload_data' => $this->upload->data());
echo "success";
}
$upload_file = $this->upload->data();
}