0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.17.165.235


Current Path : /var/www/html/phdadm/
Upload File :
Current File : /var/www/html/phdadm/ugcdocupload.php

<?php
//require_once("/Library/WebServer/Documents/oasis/aws/aws-autoloader.php");
require_once("/var/www/html/aws/aws-autoloader.php");
// require_once("C:/XAMPP/htdocs/aws/aws-autoloader.php");
use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;


        if ( 0 < $_FILES['file']['error'] ) {
            echo 'Error: ' . $_FILES['file']['error'] . '<br>';
        }
        else {
            $tempname = $_FILES['file']['tmp_name'];
            $filename = $_FILES['file']['name'];
            $ext = pathinfo($filename, PATHINFO_EXTENSION);
            $new_filename = "PHDEnterance".".".$ext;
            move_uploaded_file($tempname, 'uploads/'. $new_filename);
        }

        


        if($new_filename){
            $arr['err_code'] = 0;
            $arr['status'] = 'success';
            $arr['ugcdocpathuploadedfile']= $new_filename;
            $arr['msg'] = 'Updated Successfully...!';
            echo json_encode($arr);
            return;
        }else {
            $arr['err_code'] = -1;
            $arr['status'] = 'Failure';
            $arr['msg'] = 'Failed To update';
            echo json_encode($arr); 
            return;     
        
    }
?>