Welcome Guest, Not a member yet? Register   Sign In
Please Help Me, My Upload Images Eror..!!
#1

[eluser]konank[/eluser]
i'm trouble in path directory

This is my controller

Code:
function index()
        {
            $this->load->model('mggalery');
            
            if($this->input->post('upload'))
            {
                $this->mggalery->do_upload();
            }
            $this->load->view('gallery_view');
        }

And this is my Model
Code:
<?php
    class Mggalery extends Model
    {
        var $gallery_path;
        function Mggalery()
        {
            parent::Model();
            $this->gallery_path = realpath(APPPATH . '../images');
        }
        function do_upload()
        {
              
                 $config = array(
                 'allowed_types'=>'jpg|jpeg|gif|png',
                 'upload_path' => $this->gallery_path,
                 'max_size' => 2000
                 );
            $this->load->library('upload',$config);
            $this->upload->do_upload();
            $image = $this->upload->data();
            print_r($image);
        }
    }
?>
Code:
Array
(
    [file_name] => 321271498_235b973c7f_b.jpg
    [file_type] => image/jpeg
    [file_path] => C:/
    [full_path] => C:/321271498_235b973c7f_b.jpg //<-- Look This..!! C:/
    [raw_name] => 321271498_235b973c7f_b
    [orig_name] => 321271498_235b973c7f_b.jpg
    [client_name] => 321271498_235b973c7f_b.jpg
    [file_ext] => .jpg
    [file_size] => 277.34
    [is_image] => 1
    [image_width] => 1024
    [image_height] => 768
    [image_type] => jpeg
    [image_size_str] => width="1024" height="768"
)

my question is
why images stored on drive c???
not in my path.. C:\xampp\htdocs\new_ci\images

Sorry my english not Good..
Smile


Messages In This Thread
Please Help Me, My Upload Images Eror..!! - by El Forum - 01-13-2011, 12:06 PM
Please Help Me, My Upload Images Eror..!! - by El Forum - 01-13-2011, 12:28 PM
Please Help Me, My Upload Images Eror..!! - by El Forum - 01-13-2011, 12:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB