I have an index.php file which contains :
<img src="photo.php" />
And photo.php :
header("Content-type: image/jpg");
$result = base64_encode($arr['FOTO']);
echo "data:image/jpg;base64,$result" // 1
//echo "<img src='data:image/jpg;base64,$result' />"; // 2
The code doesn't work, can someone explain why? The image is displayed when I comment the line 1 and uncomment the line 2 and request photo.php directly.
$arr['FOTO']apathorurito ajpgfile ?