base64加密解密



$file = __DIR__ . '/image/123.jpg';

$fp = fopen($file, 'rb' );

$base = chunk_split(base64_encode(fread($fp, filesize($file))));

fclose($fp);

header("Content-type:image/gif");

exit(base64_decode($base));

你可能感兴趣的:(base64加密解密)