2012-11-30 71 views

回答

0

請務必與您的庫文件夾必須是根一起與應用程序文件夾的名稱畫廊

$config['upload_path']='./gallery/'; 
$config['allowed_types']='gif|png|jpeg|jpg'; 
$config['max_size']='100'; 
$config['max_width']='1024'; 
$config['max_height']='700'; 
$this->upload->initialize($config); 
$this->upload->do_upload('upload_photo'); 
+0

感謝它的作品,我發現我的文件夾只在錯誤的地方 – Mani

0

嘿,試試這個代碼公司控制器。這當u擊中上傳按鈕,在你的VIE形式的功能..

function sendresume() 
{ 

    $config['upload_path'] = 'C:\xampp\htdocs\upload\application'; //path where to save in the systme 
    $config['allowed_types'] = 'doc|docx|pdf'; //file types to accept while uplaoding 
    $config['max_size'] = '10240'; //size limit 

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

    if (! $this->upload->do_upload()) 
    { 
     $error = array('error' => $this->upload->display_errors()); 

     $this->load->view('upload', $error); 
    } 
    else 
    { 
     $data = array('upload_data' => $this->upload->data()); 

     echo "Resume Successfully uploaded to database............."; 
     $file = $data['upload_data']['full_path']; //upload file path 
      } 
    } 
相關問題