check if input file is set codeigniter

PHP
if (empty($_FILES['userfile']['name'])) {
}
Source

Also in PHP: