diff options
author | Malf Furious <m@lfurio.us> | 2016-03-29 19:59:36 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-03-29 19:59:36 -0400 |
commit | 3d493fc75dc6e3593001c2d9dfef26f4c1d79c2c (patch) | |
tree | 48c9561f08ff8b20cd4cb17987ea5b0b4959a53d /app | |
parent | 1f8b53e426b8c0a1546e9d5c21573be9003cb556 (diff) | |
download | scrott-3d493fc75dc6e3593001c2d9dfef26f4c1d79c2c.tar.gz scrott-3d493fc75dc6e3593001c2d9dfef26f4c1d79c2c.zip |
Add function Form::saveUploadedFile()
Added function to form class to move tmp uploaded files to permanent storage
Diffstat (limited to 'app')
-rw-r--r-- | app/class/form.class.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/class/form.class.php b/app/class/form.class.php index 529c480..3f28a36 100644 --- a/app/class/form.class.php +++ b/app/class/form.class.php @@ -232,6 +232,14 @@ class Form /* return */ return count($this->errorlist) == 0; } + + /* + * Save file uploaded through web form + */ + function saveUploadedFile($file, $filename) + { + return move_uploaded_file($file['tmp_name'], $filename); + } } ?> |