Codeigniter - 上传不在000webhost中工作

时间:2015-03-05 14:19:02

标签: php codeigniter

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();

}

0 个答案:

没有答案