Image Convert to data & it has encode & decoded due to upload from mobile

by Prabakaran 2013-10-25 10:05:17

<img src='a.jpg' width="200px;">
<?php
$path='a.jpg';
$data = file_get_contents($path);
$base64 = base64_encode($data);
$imgdata=base64_decode($base64);
$imgname = "ajith.jpg";
$path = $imgname;
$file = file_put_contents($path,$imgdata,'0777');
?>
1086
like
0
dislike
0
mail
flag

You must LOGIN to add comments