Home >php教程 >php手册 >Base64在线编码解码实现代码 演示与下载

Base64在线编码解码实现代码 演示与下载

WBOY
WBOYOriginal
2016-06-06 20:35:59959browse

最近遇到的几个程序的加密方式都是Base64加密,很是晕菜,临时整了个在线转换,但是也不全部能搞定,呵呵也许还有不行的,希望对后来人有所帮助。

在线演示地址:
gb2312版本
utf8版本

复制代码 代码如下:


header('Content-Type: text/html; charset=gb2312');
$txt1 = stripslashes(trim( @$_POST['text1']));
$button = @$_POST['button'];
$down = @trim($_GET['down']);
if ($down==1) {
header("Content-type: command");
header("Content-Disposition: attachment; filename=base64_decode.txt");
$contents = file_get_contents(basename($_SERVER['PHP_SELF']));
echo $contents;
exit;
}
?>



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn