SproutCMS

This is the code documentation for the SproutCMS project

function type()

Validation rule to test if an uploaded file is allowed by extension.

Usage

bool Upload::type ( array $file , array $allowed_types );

Arguments

  1. array $file
    $_FILES item
  2. array $allowed_types
    allowed file extensions

Return value

  • bool