本文介绍了如何使CodeIgniter文件上传类接受所有扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,如果我没有为该类提供扩展名,则不允许任何扩展名.我想允许所有扩展名.有什么方法可以不破坏内核?

Currently if I supply no extensions to the class it allows no extensions. I would like to allow all extensions. Is there any way to do this without hacking the core?

推荐答案

在Codeigniter 2中,您只需要定义允许的类型,例如:

In Codeigniter 2, you simply need to define allowed types like this :

$config['allowed_types'] = '*';

这篇关于如何使CodeIgniter文件上传类接受所有扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 15:29