【小蜗牛闲情之作
 
我经常需要用到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
在不断奉献中谋求生存发展、打造自己的优秀品质,用人性最本质最动人的一面“营销”自己!