2012-11-30 72 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 
      } 
    } 
相关问题