1
I’m trying to upload a file to the database. Only instead of him sending the file to you, he’s sending you his temporary location.
My code is like this:
$arquivo = $_FILES['arquivo'];
$name = $arquivo['name'];
$file_tmp = $arquivo['tmp_name'];
$file_bin = mysqli_real_escape_string(file_get_contents($file_tmp));
$conn = mysqli_connect('localhost', 'root', '', 'files');
$sql = "INSERT INTO malote_arq (arquivo, nome) VALUES('$file_bin', '$name')";
mysqli_query($conn, $sql);
Then when I go to the bank and rescue the contents of the field filing cabinet he shows it: C:wamp mpphpF1F2.tmp
Please put the file_get_contents argument
– Manuel Gerardo Pereira
Friend worked out of nowhere, I don’t know how....
– Meeeefiu
puts the correct code, please. Edit and ask and underneath put the code that worked.
– Manuel Gerardo Pereira