Saturday, June 6, 2020

base64 incode deocde upload image

$path = 'C:\xampp\htdocs/catrina.png';

$upload_path = "img/".uniqid()."_profiles-pic".".png";



 //$data1 = base64_decode($path );

$data = file_get_contents($path);

 




$base64 = base64_encode($data);




// $data1= base64_decode($data);

file_put_contents($upload_path, base64_decode($base64) );

?>

No comments:

Post a Comment