create new file in php
parameter name : encoding_string
header('Content-Type: bitmap; charset=utf-8');
if($_POST['encoding_string']){
$encoding_string=$_POST['encoding_string'];
$image_name=time().'.jpg';
$decode_string = base64_decode($encoding_string);
$path = 'uploads/'.$image_name;
$file= fopen($path,'wb');
$is_written=fwrite($file, $decode_string);
fclose($file);
if($is_written > 0 ){
success here ...........................
}
}
No comments:
Post a Comment