/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
main
/
up file
home
<?php include('../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_FILES['file'])) { $member_id = $_POST['member_id']; $document_id = $_POST['document_id']; $path = $_POST['path']; $uploadOk = 1; $imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION)); $file = explode(".", $_FILES['file']['name']); $file_num = count($file) - 1; $file_surname = $file[$file_num]; $document = md5(date('mds') . rand(111, 999) . date("hsid") . rand(111, 999)) . "." . $file_surname; $target_file = $path . $document; if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) { echo $document; } else { echo '500'; } }