小编Lal*_*lit的帖子

上传路径似乎无效".Codeigniter文件上传

        $config['upload_path'] = './uploads/';
        $config['allowed_types'] = 'doc|docx';
        $config['max_size'] = '400';
        $config['max_width']  = '1024';
        $config['max_height']  = '768';

    $this->load->library('upload', $config);

    if ( ! $this->upload->do_upload())
    {
        $error = array('error' => $this->upload->display_errors());

        $this->load->view('upload_form', $error);
    }
    else
    {
        $data = array('upload_data' => $this->upload->data());

  $this->referral_model->postCVReferralInfo($m_id, $emp_id , $job_id, $name, $age , $gender,$country_id, $mobile, $email, $summary, $workExp, $education, $qualification, $offer, $sb_id);
    header('location:'.$this->config->base_url().'index.php/member/referSuccess');

    exit;



    } ` 
Run Code Online (Sandbox Code Playgroud)

如果我尝试上传doc文件,那么我收到此错误"上传路径似乎无效".我将路径替换为绝对路径,然后我也收到此错误.请建议我如何解决这个问题

upload codeigniter file

7
推荐指数
3
解决办法
3万
查看次数

标签 统计

codeigniter ×1

file ×1

upload ×1