0
   As  <img src="path"> src attribute don't take the path from another driver,

so in php, image get converted to base_64 then image codes are given as path in image tag, it's working well but not in internet explorer? i am posting code here

            $img = "D://images/1s.jpg";
         $image = file_get_contents($img);

            $image_codes = base64_encode($image);
            $img1="D://images/1.jpg";
            $image1 = file_get_contents($img1);

        $image_codes1 = base64_encode($image1);
?>

              <div style="float:left; width:900px; display:block;">
              <h2><a href="index.php">Back to pirobox homepage</a> demo1</h2>



               <div class="demo"><a href="data:image/jpg;charset=utf-8;base64,<?php                       echo $image_codes; ?>" class="pirobox_gall" title="Spain 2009" >

      <img src="data:image/jpg;charset=utf-8;base64,<?php echo $image_codes; ?>" width="100" height="100" /></a></div>

             </div>
       <div style="float:left; width:90%; display:block; margin:5px 0 0 5px;">


           </div>
        </body>
shwe45
  • 13
  • 1
  • 2
  • What IE version? IE has a limit of characters for the `src` and `href` attributes. The base64 encoded string is probably longer. See http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers/417184#417184 for more info – putvande May 28 '14 at 08:19
  • IE 9 and also tried in IE11 – shwe45 May 28 '14 at 08:21

0 Answers0