$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;
} `
如果我尝试上传doc文件比我收到错误“上传路径似乎不是有效的”。我替换路径绝对路径,然后我得到这个错误。 请建议我怎么能解决issue.`上传路径似乎不是有效的“。 Codeigniter文件上传
你的上传文件夹在哪里? –
上传文件夹位于主文件夹内(其中应用程序文件夹,图像文件夹等位于主文件夹内) – Lalit
确保该目录是可写的。什么chmod设置在它上面? – thpl