I need help.
I have a system that needs to upload a file to bd. The system stores the image bin in the database instead of creating a file reference on the server. This bin is corrupted, the image does not open.
Follow the code:
$anexo = $_FILES['anexo'];
$img_bin = addslashes(fread(fopen($_FILES['anexo']['tmp_name'], "r"), filesize($_FILES['anexo']['tmp_name'])));
$class_model->setImg_Bin($img_bin);