public function timeceshi()
{
$img = 'http://www.lh.com/uploads/20181119/8760db7392380af20342e07813ad079.jpg';
$base64_img = base64_encode(file_get_contents($img));
$imageName = "25220_".date("His",time())."_".rand(1111,9999).'.png';
if (strstr($base64_img,",")){
$base64_img = explode(',',$base64_img);
$base64_img = $base64_img[1];
}
$path = "./uploads/code/".date("Ymd",time());
if (!is_dir($path)){
mkdir($path,0777,true);
}
$imageSrc= $path."/". $imageName;
$r = file_put_contents($imageSrc, base64_decode($base64_img));
}