|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2012-2-25 15:47:44
|
显示全部楼层
本帖最后由 y_y 于 2012-2-25 15:53 编辑
if( ! empty($_POST)){
//var_dump($_POST);exit;
//var_dump($_FILES);exit;
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$config['max_size'] = '100000000000';
$config['max_width'] = '102400000000';
$config['max_height'] = '768000000';
$config['encrypt_name'] = TRUE;
$this->load->library('upload',$config);
if($this->upload->do_upload('pro_img')){
echo '上传成功!';
}
else{
echo '上传失败!';
$error = array('error' => $this->upload->display_errors());
var_dump($error);
}
exit;
$this->product_model->save($_POST);
} |
|