Commit 6410e833 authored by Michael Hasselbring's avatar Michael Hasselbring

Created File::upload()

parent 0b7dbab0
...@@ -186,4 +186,15 @@ class File { ...@@ -186,4 +186,15 @@ class File {
return $response; 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