Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-06 20:35:59
Original
904 people have browsed it

最近遇到的几个程序的加密方式都是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;
}
?>



Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!