$ _ FILES是否可以接受变量?我print_r $ fileName,它不识别索引
HTML
<input type="file" id="file_id">
JQUERY
const update_image = $("#file_id");
update_image.change(function() {
$.post('upload_update.php', {
pass_file: update_image.val()
});
})
PHP
$getFile = $_POST['pass_file'];
$fileName = $_FILES[$getFile]['name']; //This displays undefined index