$ _FILE not defined

1

I have a problem with the $ _FILE global variable. It's my first time using it, and then I face this problem. I set the enctype, all right, but it shows that the variable does not exist ...

<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
<form method="post" enctype="multipart/form-data">
    <input type="file" name="arquivo">
    <input type="submit" name="upload">
</form>
<br>
<br>
<strong>$_FILE</strong><br>
<br>
<?php var_dump($_FILE); ?>
<br>
<br>
<strong>$_POST</strong><br>
<br>
<?php var_dump($_POST); ?>
</body>
</html>

Even after choosing a file, $ _FILE does not work

    
asked by anonymous 04.09.2018 / 23:53

1 answer

2

The correct name will be $_FILES instead of $_FILE . You can check the documentation here.

    
05.09.2018 / 00:00