Merge pull request #18 from mikelbring/develop

Created File::upload()
This commit is contained in:
Taylor Otwell 2011-06-26 06:44:56 -07:00
commit e0cb6e6aba
1 changed files with 11 additions and 0 deletions

View File

@ -186,4 +186,15 @@ public static function download($path, $name = null)
return $response;
}
/**
* Move uploaded file, Use $_FILES['file'] for $file
*
* @param array $file
* @param string $path
* @return bool
*/
public static function upload($file, $path)
{
return ( ! move_uploaded_file($file['tmp_name'], $path)) ? false : true;
}
}