Example #1
0
 function do_upload1()
 {
     if ($this->input->post('upload')) {
         $this->load->model('Mod_upload');
         echo pass;
         $this->Mod_upload_ > doupload();
     } else {
         echo pass;
     }
 }
        } else {
            if ($exttype == 'srt') {
                $allowedExtensions = array('srt', 'SRT');
            }
        }
    }
}
if (!iserror()) {
    if ($pro == 1 && empty($_FILES['myfile'])) {
        $errorcode = 13;
    } else {
        $file = $_FILES['myfile'];
        if (no_file_upload_error($file)) {
            if (is_allowed_extension($file)) {
                if (!filesizeexceeds($file)) {
                    doupload($file);
                }
            }
        }
    }
}
/**
 * Check the  error  occur  in the upload  the  files or  not
 * @return boolean
 */
function iserror()
{
    global $error;
    global $errorcode;
    if ($error == 'cancel') {
        $errorcode = 1;