Good 4 Denunciar post Postado Abril 7, 2015 Lembro uma vez que usei um captcha que não salvava imagem, simplesmente gerava sem gravar nada na hospedagem.. e pesquisei alguns códigos que transformam texto em imagem.. Achei vários, e trago este como exemplo: $im = imagecreate(100, 30); // White background and blue text $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 255); // Write the string at the top left imagestring($im, 5, 0, 0, 'Hello world!', $textcolor); // Output the image header('Content-type: image/png'); imagepng($im); imagedestroy($im); Mas aí me pergunto o porque de não funcionar, aparece aquele ícone como se fosse um erro 404 de imagem... Alguém sabe porque? A versão do php é 5.5.12, tem que ter algo ativado? Pq testei localmente e também na hospedagem e acontece o mesmo problema... obrigado Compartilhar este post Link para o post Compartilhar em outros sites
Williams Duarte 431 Denunciar post Postado Abril 8, 2015 Só chamar o arquivo .php na src da tag img Exemplo: <img src="caminho/img.php" /> Compartilhar este post Link para o post Compartilhar em outros sites
Good 4 Denunciar post Postado Abril 8, 2015 Dá no mesmo, tanto acessando pela url quanto usando esta tag de img.. Compartilhar este post Link para o post Compartilhar em outros sites