Maison  >  Article  >  développement back-end  >  Base64在线编码解码实现代码 演示与下载_PHP教程

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

WBOY
WBOYoriginal
2016-07-21 15:32:121985parcourir

在线演示地址:
gb2312版本 http://tools.jb51.net/tools/base64_decode-gb2312.php
utf8版本 http://tools.jb51.net/tools/base64_decode-utf8.php

复制代码 代码如下:

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;
}
?>



Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn