1
I have a problem with the $_FILE global variable. It’s my first time using it, and soon I come across 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, the $_FILE does not work
check if it was started first with
if (isset($_FILE['arquivo'])) { }
– novic
I’ve tried that, but I can try again
– Alan
didn’t work..
– Alan
has a
<?php var_dump($_FILE); ?>
it shouldn’t be like this– novic
hello, I’ve tried check mode with isset() and etc, but the error persists, it doesn’t even know the variable $_FILE
– Alan
Look just went unnoticed is
$_FILES
at least it was resolved.– novic