21 lines
414 B
PHP
Executable File
21 lines
414 B
PHP
Executable File
<?php
|
|
|
|
if ( !empty( $_FILES ) ) {
|
|
|
|
$tempPath = $_FILES[ 'file' ][ 'tmp_name' ];
|
|
$uploadPath = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . $_FILES[ 'file' ][ 'name' ];
|
|
|
|
move_uploaded_file( $tempPath, $uploadPath );
|
|
|
|
$answer = array( 'answer' => 'File transfer completed' );
|
|
$json = json_encode( $answer );
|
|
|
|
echo $json;
|
|
|
|
} else {
|
|
|
|
echo 'No files';
|
|
|
|
}
|
|
|
|
?>
|