Reputation: 35
Codeigniter3
do_upload perfectly working in local machine but not in shared server.
The $error is showing
"The upload path does not appear to be valid."
but upload path is just ok with 777
permission.
what to do?
$config['upload_path'] = FCPATH.'/uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload('document_files'))
{
$error = array('error' => $this->upload->display_errors());
echo "<pre>";
print_r($error);
die();
}
else
{
$data = array('upload_data' => $this->upload->data());
echo "<pre>";
print_r($data);
die();
}
Upvotes: 0
Views: 56