如果未在CodeIgniter中选择要更新的图像,如何从数据库设置图像的路径

时间:2019-03-02 19:51:11

标签: php codeigniter mysqli

如果在CodeIgniter中更新HTML文件输入时未选择任何图像,请您帮我解决从数据库中插入的图像的路径。

        $config['upload_path']   = "./upload/";
        $config['allowed_types'] = "png|jpg|gif";
        $this->load->library("upload", $config);

        if($this->upload->do_upload('profile')){
            $uploaded = $this->upload->data();
            $done_uploading["file"] = $uploaded['file_name'];
            $finalize = $done_uploading["file"];
        } else {
             //Here need code for leaving the already set path of the image to same
        }

0 个答案:

没有答案