我有一个小问题。 我有上传自定义配置文件。 我想不重新定义它们加载设置。
好吧,我的配置是这样的:
config.php文件
$config['upload_path'] = 'tmp/';
$config['allowed_types'] = 'zip';
$config['file_name'] = '';
$config['max_size'] = '';
$config['encrypt_name'] = false;
$config['remove_spaces'] = true;
调节器
// Here is my problem $config[]
// How to load settings from config.php without again defining $config array
$config['upload_path'] = $this->config->item('upload_path');
$config['allowed_types'] = $this->config->item('allowed_types');
$config['file_name'] = $this->config->item('file_name');
$config['max_size'] = $this->config->item('max_size');
$config['encrypt_name'] = $this->config->item('encrypt_name');
$config['remove_spaces'] = $this->config->item('remove_spaces');
$this->load->library('upload',$config);
if(!$this->upload->do_upload())
{
$this->session->set_flashdata('error', $this->upload->display_errors());
redirect('extension/');
}
我想绕过$配置[“测试] = $这个 - > config->项(”试验')的重新定义;
这是不可能的?