如果上传图片超过尺寸和大小怎么提示

function do_upload(){
$data = $this->input->post();
$id = $data['id'];
$date = date('Ymd');
$config['upload_path'] = FCPATH.$this->config->item('upload_path').'mall/'."$date/";
if(!file_exists(FCPATH.$this->config->item('upload_path').'mall/'."$date/")){

mkdir(FCPATH.$this->config->item('upload_path').'mall/'."$date/",0777,true);
}

$config['file_name'] = $id.".jpg";
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = 200;
$config['max_width'] = 400;
$config['max_height'] = 400;
$this->load->library('upload', $config);
if ( !$this->upload->do_upload('userfile'))
{

$ret['msg'] = '上传失败';
jsonpcallback($ret);
}else{
$id = $data['id'];
$set['pic'] = 'mall/'."$date/"."$id.jpg";
$retid = $this->mall_gift_model->update($set,array('id'=>$data['id']));
$ret['succ'] = 1;
jsonpcallback($ret);
}
}