Commit e0cb6e6a authored by Taylor Otwell's avatar Taylor Otwell

Merge pull request #18 from mikelbring/develop

Created File::upload()
parents 0b7dbab0 6410e833
......@@ -186,4 +186,15 @@ class File {
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;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment