简单实用的base64字符串编解码页面
2009-03-22 10:07
218 查看
【小蜗牛闲情之作
】
我经常需要用到base64字符串编码解码来做测试,使用php的base64编解码函数容易实现,下面这个页面是我自己的常用工具:
base64_encodec.php
<?php
header("content-type: text/html; charset=utf-8");
$encoded_string = base64_encode($_POST['chars']);
$decoded_string = base64_decode($_POST['chars']);
?>
<table align="center">
<h1>Base64 字符串编解码</h1>
</table>
<table align="center">
<form name="base64" method="post">
请输入字符串:<br>
<textarea name="chars" rows=4 cols=60></textarea><br><br>
Base64 编码:<br>
<textarea name="encoded" rows=4 cols=60><?php if ($_POST['encode']) echo $encoded_string ?></textarea><br><br>
<input type=submit name="encode" value="编码"><br><br>
Base64 解码:<br>
<textarea name="decoded" rows=4 cols=60><?php if ($_POST['decode']) echo $decoded_string ?></textarea><br><br>
<input type=submit name="decode" value="解码">
</form>
</table>
------------------------------------------------------------------------------------------
赵小蜗牛
QQ: 755721501
E-mail: [email]snailwarrior@qq.com[/email]
在不断奉献中谋求生存发展、打造自己的优秀品质,用人性最本质最动人的一面“营销”自己!
】
我经常需要用到base64字符串编码解码来做测试,使用php的base64编解码函数容易实现,下面这个页面是我自己的常用工具:
base64_encodec.php
<?php
header("content-type: text/html; charset=utf-8");
$encoded_string = base64_encode($_POST['chars']);
$decoded_string = base64_decode($_POST['chars']);
?>
<table align="center">
<h1>Base64 字符串编解码</h1>
</table>
<table align="center">
<form name="base64" method="post">
请输入字符串:<br>
<textarea name="chars" rows=4 cols=60></textarea><br><br>
Base64 编码:<br>
<textarea name="encoded" rows=4 cols=60><?php if ($_POST['encode']) echo $encoded_string ?></textarea><br><br>
<input type=submit name="encode" value="编码"><br><br>
Base64 解码:<br>
<textarea name="decoded" rows=4 cols=60><?php if ($_POST['decode']) echo $decoded_string ?></textarea><br><br>
<input type=submit name="decode" value="解码">
</form>
</table>
------------------------------------------------------------------------------------------
赵小蜗牛
QQ: 755721501
E-mail: [email]snailwarrior@qq.com[/email]
在不断奉献中谋求生存发展、打造自己的优秀品质,用人性最本质最动人的一面“营销”自己!
相关文章推荐
- PHP安全的URL字符串base64编码和解码
- 两个实用的方法从Base64字符串生成RSAPublicKey及RSAPrivatekey
- C# 使用base64对字符串进行编码和解码
- 简单实用 开启SNB本本1080P解码模式
- js简单Base64编码解码
- 将BASE64编码的字符串进行解码
- 简单实用TAB选项卡,支持单页面多个调用
- 将Bitmap用Base64转码成字符串,再解码回来出现黑色背景的问题原因及解决办法。
- PHP安全的URL字符串base64编码和解码
- 将图片转成base64字符串并在JSP页面显示的Java代码
- js对图片base64编码字符串进行解码并输出图像示例
- 使用GTMBase64编码解码字符串
- URL安全的字符串base64编码和解码
- Python简单实现Base64编码和解码的方法
- PHP安全的URL字符串base64编码和解码
- 仿凤凰网的注册页面,javascript完成简单的空/邮箱格式/字符串的长度校验 ajax完成服务器端是否同名校验
- 最简单实用的 jquery 选项卡 DIV+CSS 页面内可放置无限多个选项卡
- 给页面加上Loading效果最简单实用的办法
- 简单实用读取字符串信息的c++类
- PHP安全的URL字符串base64编码和解码