Hi. I have this: <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <form name="cargar" action="VerTipoFileShow.php" method="POST" enctype="multipart/form-data"> <input type="file" name="archivo" size="2"></input> <input type="submit" value="Cargar Archivo"></input> </form> </body> </html> HTML: I want to see the type of file using $_FILES[] and using FINFO_FILE(); <?php echo "Tipo usando FILES :".$_FILES['archivo']['type']; echo "<br/>"; $finfo = finfo_open(FILEINFO_MIME_TYPE); $filename = $_FILES['archivo']['name']; echo "Tipo usando FINFO:".finfo_file($finfo, $filename); ?> PHP: But I get this message: Warning: finfo_file(file.ext): failed to open stream: No such file or directory in Show.php on line 8 Code (markup): What is the problem? Note: fileinfo is enabled.
Perhaps line #6 should be: $filename = $_FILES['archivo']['tmp_name']; PHP: Ref. to see (scroll page down a bit): http://php.net/manual/en/features.file-upload.post-method.php