UploadFile::checkType PHP Method

checkType() private method

+---------------------------------------------------------- 检查上传的文件类型是否合法 +---------------------------------------------------------- +----------------------------------------------------------
private checkType ( string $type ) : boolean
$type string 数据 +----------------------------------------------------------
return boolean +----------------------------------------------------------
    private function checkType($type)
    {
        if (!empty($this->allowTypes)) {
            return in_array(strtolower($type), $this->allowTypes);
        }
        return true;
    }