خرید بک لینک

Vote count: 0

A PHP Error was encountered

Severity: Notice

Message: Undefined index: uploadimg

Filename: models/upload_model.php

Line Number: 26

/my code/ Controller

public function do_upload(){
    $this->upload->do_upload();
    if($this->upload_model->Doupload()){
        echo 1;
    }else{
        echo 0;
    }
}
 private function set_config_option(){
    $config =array(
        'allowed_type' => 'gif|jpg|png|jpeg|pdf|doc|xml|zip|rar',
        'file_size'  => '100',
        'max_width'  => '1024',
        'overwrite'  => TRUE,
        'max_height' => '768',
    );
    retu $config;
}

Model

 private function set_config_option(){
    $config =array(
        'allowed_type' => 'gif|jpg|png|jpeg|pdf|doc|xml|zip|rar',
        'file_size'  => '2048000',
        'max_width'  => '1024',
        'overwrite'  => TRUE,
        'max_height' => '768'
    );
    retu $config;
}

public function Doupload(){



    $target_path = 'uploads/';
    $target_file = $target_path. basename($_FILES['uploadimg']['name']);
    $base_url = base_url();
    $img_title = $this->input->post('imgname');

    $this->upload->initialize('upload', $this->set_config_option());
  //  $img = $this->upload->do_upload();    
   }

Please help me...

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 29 اسفند 1394 ساعت: 17:11

صفحه بندی