2
Follow the code, then the question.
$localDiretorioFoto = "img/mensagens/";
$img = $_FILES["foto"]["tmp_name"];
$imgg = getimagesize($img);
if($imgg["mime"] == "image/jpeg") {
$nomeFoto = imagecreatefromjpeg($img);
} else if($imgg["mime"] == "image/png") {
$nomeFoto = imagecreatefrompng($img);
}
imagejpeg($nomeFoto, $localDiretorioFoto, 50);
I’m trying to save an image, and I’m saving the $name in the comic book, but what it saves is: Resource id #4 and the image is not saved in the folder img/messages/ why?
Should I use header and/or imagedestroy? If so, why?
Someone? :(.....
– Igor
I’m trying to create an answer. =)
– stderr
Ah, okay @Qmechanic73! Thank you.
– Igor
I risked an answer, see if that’s it.
– stderr