[eluser]chmod[/eluser]
i have another question:
like this:
controller:
-------------------
function _check_tgmember_exist($username){
$this->load->model('center/personal/becometgmember_model');
$result_check = $this->becometgmember_model->_check_tgmember_exist($username);
if ($result_check){
return TRUE;
}else{
$this->validation->set_message('_check_tgmember_exist','failed');
return FALSE;
}
}
$username = $this->input->post('username');
$rules['username'] = "trim|required|xss_clean|callback__check_tgmember_exist";
but when the input is a multipart,
by this way,when the field's type is file,how can i check user to upload his picture with ruels?
like these:
view:
------------
<?=form_open_multipart('iBecometgmember');?>
<div>
<label for="cardid_pic">news:</label>
<input type="file" name="cardid_pic" id="cardid_pic" />
</div>
...
<div>
<input type="submit" name="Submit" value="submit" />
</div>
</form>
controller:
----------------
$cardid_pic = $this->input->post('cardid_pic');
$rules['cardid_pic'] = "trim|required|callback__check_cardid_pic";
function _check_cardid_pic($cardid_pic){
if ($cardid_pic){
return TRUE;
}else{
return FALSE;
}
}
but the $cardid_pic = null,
how can I do???