fabiobruna
8/25/2014 - 6:14 PM

Bruikbaar voor webmail php? From http://php.net/manual/en/function.base64-encode.php

Bruikbaar voor webmail php?

From http://php.net/manual/en/function.base64-encode.php

<?php  function base64_encode_image ($filename=string,$filetype=string) {     if ($filename) {         $imgbinary = fread(fopen($filename, "r"), filesize($filename));         return 'data:image/' . $filetype . ';base64,' . base64_encode($imgbinary);     } } ?>  used as so  <style type="text/css"> .logo {     background: url("<?php echo base64_encode_image ('img/logo.png','png'); ?>") no-repeat right 5px; } </style>  or  <img src="<?php echo base64_encode_image ('img/logo.png','png'); ?>"/>