开发者

CodeIgniter uploads files with duplicate file extensions

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜