Do_upload函数不工作- codeigniter 3


do_upload function not working - codeigniter 3

我已经在IIS上配置了一个代码点火器项目。我面临的问题,而在用户模型中使用上传库上传图像。这是我的函数。

public function upload_image($file,$path, $url) {
        $image = time();
        //////////Remove any Old file with this name///////
        if (file_exists($path . $image))
            unlink($path . $image);
        ///////////////////////////////////////////////////
        $config['upload_path'] = $path;
        $config['allowed_types'] = 'jpg|png|gif|jpeg';
        $config['file_name'] = $image;
        $this->load->library('upload', $config);
        $this->upload->initialize($config);
        if (!$this->upload->do_upload($file)) {
            $this->session->set_flashdata('error', $this->upload->display_errors());
            return false;//redirect($url);
            // $this->session->set_flashdata('post', $this->input->post());
            // $this->reload($url, $this->upload->display_errors(), 'danger');
        } else {
            $upload_data = $this->upload->data();
            return $upload_data['file_name'];
        }
    } 

我像这样从控制器调用这个函数

$path = 'assets/profileimages/';
$file = 'imagefile';
$imagepath= $this->users->upload_image($file,$path,'Users/addUser');

显示如下错误:

domainname currently unable to handle this request.

日志中出现如下错误。

404 Page Not Found: Users/assets
有谁能帮我解决这个问题吗?

我终于解决了这个问题。这是由于php.ini中的"extension=php_fileinfo.dll"未启用。这是codeigniter 3.1.2的要求。