<?php header( "Content-type: image/jpeg"); //$filename='1.jpg'; //$content=file_get_contents($filename); //$content = base64_encode($content); // 将二进制信息编码成字符串 //file_put_contents('6.txt',$content); $file='6.txt'; $content=file_get_contents($file); echo base64_decode($content);//输入图片