Önem karşılaşıldı: i hata darbe görebilirsiniz : 26
Kodum:
Kontrolör
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',
);
return $config;
}
Modeli
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'
);
return $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();
}
Lütfen bana yardım ...