Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | <?php |
| 2 | exit; // upload demo is disabled |
||
| 3 | |||
| 4 | if ( !empty( $_FILES ) ) { |
||
| 5 | $tempPath = $_FILES[ 'file' ][ 'tmp_name' ]; |
||
| 6 | $uploadPath = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . $_FILES[ 'file' ][ 'name' ]; |
||
| 7 | |||
| 8 | move_uploaded_file( $tempPath, $uploadPath ); |
||
| 9 | |||
| 10 | $answer = array( 'answer' => 'File transfer completed' ); |
||
| 11 | $json = json_encode( $answer ); |
||
| 12 | |||
| 13 | echo $json; |
||
| 14 | |||
| 15 | } else { |
||
| 16 | echo 'No files'; |
||
| 17 | } |
||
| 18 | ?> |