Any obvious reasons why CodeIgniter would duplicate th开发者_运维百科e file extension when using its Upload library? Tried all sort of ways to set the file name (with and without extension) and nothing seem to work. Any tips?
I've encountered this same issue previously (unsure why, as it certainly doesn't occur in all my projects). The following fixed it for me (where $file_name is name of file):
$ext = end(explode('.',$file_name));
$config['file_name'] = basename($file_name,'.'.$ext);
精彩评论