php 用base64对图片加密
php 用base64对图片加密如何对其解密呢?加密代码如下:<html>
<head>
<title>TesT</title>
</head>
<body>
<?php
$file = "./image/index.png";
$type = getimagesize($file);
$fp = fopen($file,"r") or die("Can't open file");
$file_content = chunk_split(base64_encode(fread($fp,filesize($file))));
switch($type){
case 1:$img_type="gif";break;
case 2:$img_type="jpg";break;
case 3:$img_type="png";break;
}
$img = 'data:image/'.$img_type.';base64,'.$file_content;
fclose($fp);
?>
<img id="img" src="<?php echo $img; ?>" />
</body>
</html> decode就不会了吗. aes 之流才算加密。。 回复 2# linux_c_py_php
怎么用?
页:
[1]