在codeigniter中存储图像路径

Hello I have a write a code that upload image path into the database but the thing is it uploads the real path (C:/wamp/www/amref/images/student_profile/childbrah2.jpg) hence when I fetch the path form the database in order to display the image it gives me the error that the link is broken. I want to store only (images/student_profile/childbrah2.jpg).

The controller code:

$config['upload_path'] = '../images/student_profile/';
        $config['allowed_types'] = 'gif|jpg|png|jpeg';
        $config['max_size'] = "2048000"; // Can be set to particular file size , here it is 2 MB(2048 Kb)
        $config['max_height'] = "768";
        $config['max_width'] ="1024";

        $this->load->library('upload', $config);

        if(!$this->upload->do_upload()){

             echo '<h4 style="color: red;">

                    Failure! </h4>

                    <p style="color: red;">'.$this->upload->display_errors().'</p>';



        } else {
            $data_upload_files = $this->upload->data();

            $image = base_url($data_upload_files['full_path']);

Yes of course. It want be happen.

Because you inserting $config['upload_path'] = '../images/student_profile/';

so path is C:/wamp/www/amref/images/student_profile/.

If you enter this as C:/wamp/www/amref/images/student_profile/ this will not work in your server. Cz in your server there is no partition call C:.

So use your path as it is.

EDIT 01

<?php

    $old = 'C:/wamp/www/amref';
    $fulpath = $old.'/images/student_profile/';

    echo $fulpath;