[eluser]Unknown[/eluser]
hello ervery body,
I'm using ci to build a tiny system, and i want to add a control to upload files.
then i had the code,
controllers/docs.php
Code:
$config['upload_path'] = './docs/';
$config['allowed_types'] = 'pdf|doc|xls';
$config['max_size'] = '1000';
$this->load->library('upload', $config);
$this->upload->initialize($config);
if($this->upload->do_upload('docfile'))
{
echo 'file upload';
}else{
$this->upload->display_errors();
}
It can upload a pdf file, but not a doc file.
It's must some errors.
and I check
1. /system/application/config/mimes.php
Code:
'doc' => 'application/msword',
'word' => array('application/msword', 'application/octet-stream'),
2. /Apache2.2/conf/mime.types
Code:
application/msword doc dot
and i've follow someone's sugesstion,
to modify upload.php in library, even use the userguide sample
it still not work.
did I miss some step to upload a doc or xls,
somebody could help me to fix it?
btw, i didn't install MS Office.
Is it the possible reason?