• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upload problem - no file upload, but no error

#1
[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?


Messages In This Thread
upload problem - no file upload, but no error - by El Forum - 12-02-2008, 09:30 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.