[eluser]mikevu[/eluser]
Hello everyone,
Now I have a issue with my project is upload file.
this is my code
Code:
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'txt|doc|pdf|gif|jpg|png';
//$config['allowed_types'] = 'doc|pdf';
$config['max_size'] = '5120';
$config['remove_spaces'] = true;
$this->load->library('upload', $config);
$this->upload->initialize($config);
if ( !$this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
$row['result'] = 0;
echo json_encode($row);
}
else
{
$data = $this->upload->data();
$full_path = $data['full_path'];
..
I can upload pdf, txt, gif and jpg file. But I can't upload doc file or png file.
anyone help me?
Thank you very much.