Add simple PHP upload handler.
This commit is contained in:
parent
560c8253c9
commit
633f8d927c
1 changed files with 21 additions and 0 deletions
21
upload.php
Normal file
21
upload.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Upload - Handles uploading files
|
||||||
|
*
|
||||||
|
* Takes an upload request from jquery.filedrop and stores the incoming
|
||||||
|
* files on the server for later viewing.
|
||||||
|
*
|
||||||
|
* @author Andrew Tomaka
|
||||||
|
* @version 1
|
||||||
|
**/
|
||||||
|
|
||||||
|
define('UPLOADS','uploads/');
|
||||||
|
|
||||||
|
if(array_key_exists('file', $_FILES)) {
|
||||||
|
$file = $_FILES['file'];
|
||||||
|
|
||||||
|
move_uploaded_file($file['tmp_name'], UPLOADS . $file['name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
Loading…
Reference in a new issue